This commit is contained in:
Carol (Nichols || Goulding) 2016-08-02 16:31:21 -04:00
parent 32f087ef36
commit ba95d0a22f

View File

@ -68,8 +68,9 @@ the binding `byte` will hold the actual byte, not a reference to a byte.
s.len() s.len()
``` ```
We search for the value 32, which represents a space in UTF-8. If we find one, we return the We search for the value 32, which represents a space in UTF-8. If we find one,
position. Otherwise, we return the length of the string, using `s.len()`. we return the position. Otherwise, we return the length of the string, using
`s.len()`.
This works, but theres a problem. Were returning a `usize` on its own, but This works, but theres a problem. Were returning a `usize` on its own, but
its only a meaningful number in the context of the `&String`. In other its only a meaningful number in the context of the `&String`. In other