-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[External] [stdlib] Refactor
atol
: StringRef
to StringSlice
and…
… reusability (#51354) [External] [stdlib] Refactor `atol`: `StringRef` to `StringSlice` and reusability This pull request modularises previously inline code, assisting in addressing issue #2639 to allow `stol` function to reuse some of the functionality. These changes, initially part of #3178, have been separated for easier review. The refactoring extracts `_handle_base_prefix` & `_trim_and_handle_sign`. Additionally, the docstring has been revised for clarity. Alongside these changes, the respective function signatures have been updated to move away from `StringRef` to `StringSlice`. There was also a small `FIXME` to convert from `var` to `alias`, which is now seems possible. Co-authored-by: Joshua James Venter <[email protected]> Closes #3207 MODULAR_ORIG_COMMIT_REV_ID: e733ed473f086abe6fc5acccae711e0114c1093d
- Loading branch information
1 parent
5ff00c7
commit be09f29
Showing
2 changed files
with
137 additions
and
74 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