-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strutil: add new utilities for parsing values out of strings (#3173)
* `parse_values()` and `scan_values()` both can parse a series of values in a string, with optional prefix, suffix, and separator. The scan versions just figure out the values, the parse versions optionally can update a string_view& like the other parsing functions in Strutil. * `scan_datetime` parses the int components of a string that looks like "YYYY:MM:DD hh:mm:ss" (and a few minor variants). * Fix stoui -- it was previously casting stoi results, which is not correct. * Add `from_string<>` specialties for `double`, `int64_t`, `uint64_t`.
- Loading branch information
Showing
3 changed files
with
222 additions
and
3 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