I was looking through Rust\'s source code to better acquaint myself with the language. I came across this snippet.
// Collect program arguments as a Vec
Two periods (..) is the range operator. You can find this in the Operators and Symbols Appendix of the Rust book. There are six flavors:
1..101....10..1..=10..=10When no item occupies an end position, the range goes on "forever" in that direction.
This combines with the Index trait (or IndexMut, if mutation is required). In your example, you have a string slice (kind of, see next point) that you are applying indexing to: "foo"[2..].
Specifically, &str implements Index as
Returns a slice of the given string from the byte range
Then there's a third bit of ergonomics happening: Deref (or DerefMut in similar cases). String implements Deref by returning a &str, so any method available to a &str is available to a String.