You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we do not want to change its semantic, I would like propose to rename it to char_at_byte_position, or just remove the method. It is not very useful to get a char from byte index. Similar to char_at_reverse.
The text was updated successfully, but these errors were encountered:
There is a standard here: all index-based operations work on bytes. This is the only reasonable choice for a "random" access operation on a UTF8 string. We could definitely consider renaming to code_point_at, or just remove the method, though.
I do not believe we have done a fine-grain stablization pass for str, only String. See #17438 for details.
Yes, as @gankro mentions this is consistent with our current conventions with indexing and strings. I'm working on a patch for the fine-grained stabilization of str but I'm likely going to leave these methods as unstable for now as it's unclear how certain we are of them in a 1.0 world.
For now though I'm going to close this issue as the usage of indexing and lack of mentioning "byte" is consistent with our current conventions with string apis.
If we do not want to change its semantic, I would like propose to rename it to
char_at_byte_position
, or just remove the method. It is not very useful to get a char from byte index. Similar to char_at_reverse.The text was updated successfully, but these errors were encountered: