|
|
|
|
|
by brians
337 days ago
|
|
Can you help me understand what’s happening between the split and the filter on “a <space> <space> <space> b”? I expect that to be a series of calls to split, each yielding an empty slice. So the whole iterator yields a slice pointing at a, then a slice pointing at b—but it’s had to handle three intermediate slices to get the b. Right? |
|
(But as mentioned, this doesn't perform any allocations, since each slice is just a pointer + length into the original string.)