summaryrefslogtreecommitdiff
path: root/Difference between string slice and slice of strings.md
diff options
context:
space:
mode:
Diffstat (limited to 'Difference between string slice and slice of strings.md')
-rw-r--r--Difference between string slice and slice of strings.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/Difference between string slice and slice of strings.md b/Difference between string slice and slice of strings.md
new file mode 100644
index 0000000..1105ce7
--- /dev/null
+++ b/Difference between string slice and slice of strings.md
@@ -0,0 +1,4 @@
+A string slice: `&str`
+A slice of strings: `&[String]`
+
+`&[String]` for example can be used to reference a subset of a `Vec<String>` while `&str` references part of a `String`. \ No newline at end of file