Hacker News new | past | comments | ask | show | jobs | submit login

Obviously you haven't seen the Substring [1] type of Swift.

[1] https://developer.apple.com/documentation/swift/substring




But this is a slice. So technically a []char?


Not really. It's only a reference to the original string, a start index, and an end index. It doesn't store a second (partial) copy of the string.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: