diff options
author | Jasper Ras <jras@hostnet.nl> | 2025-08-21 22:09:29 +0200 |
---|---|---|
committer | Jasper Ras <jras@hostnet.nl> | 2025-08-21 22:09:29 +0200 |
commit | 27514d58573ce1f844af4ea60afa72c7f58f1cd7 (patch) | |
tree | 4b16c31f73cb72435d03d5e105261143f8ca135f /Difference between string slice and slice of strings.md | |
parent | 22675cd8dc75d8b8d4b0f818f5b093efbc364802 (diff) |
Diffstat (limited to 'Difference between string slice and slice of strings.md')
-rw-r--r-- | Difference between string slice and slice of strings.md | 4 |
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 |