|
|
|
|
|
by ezfe
182 days ago
|
|
Because that implies that String is a random access collection. You cannot constant-time index into a String, so the API doesn't allow you to use array indexing. If you know it's safe to do you can get a representation as a list of UInt8 and then index into that. |
|