News for hackers. Stuff that matters.
Re:Thoughts on Rust, a few thousand lines in by steveklabnik on Wednesday January 09, 2019 @09:09PM (#18870946)
panics are safe. You expect the “I don’t have a bug” case to be fast.

You can, but it depends on what you mean by “character”, as that’s not a concept in Unicode. Every kind of thing you could mean has a method, specific to it, since they’re different things.

(char in Rust is a Unicode scalar value, and you can collect into a Vec<char> and then slice it, as an example of one of those things. And that’s still O(1) at the cost of using up to four times the memory.)

There are no comments on this comment yet.