-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[framework] Implements ascii + utf8 strings all over again (#18462)
## Description This PR rolls #17380 (successfully merged once) yet again. ## Test plan Features tests. ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [x] Protocol: This change updates the [ascii module](https://docs.sui.io/references/framework/move-stdlib/ascii) in the following ways: Adds new methods to `std::ascii`: - `ascii::append(&mut String, String)` - `ascii::is_empty(): bool` - `ascii::substring(&String, i, j): String` - `ascii::index_of(&String, &String): u64` - `ascii::to_uppercase(&String): String` - `ascii::to_lowercase(&String): String` These additions make the ASCII interface more similar to the UTF8 one. Renames: - `string::bytes() to string::as_bytes()` - `string::sub_string() to string::substring()` Deprecates: - `string::sub_string` in favour of `string::substring` - `string::bytes` in favour of `string::as_bytes` Additional changes: - updates `std::type_name` to use `std::substring` - removes use statements for implicit imports - renames constants from `E_INDEX` to conventional `EIndexOutOfBounds`
- Loading branch information
Showing
22 changed files
with
758 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.