28 bool allow_negative) {
31 if (is_negative && !allow_negative) {
36 [](
char c) {
return isdigit(
static_cast<unsigned char>(c)) != 0; });
42 if (
value == INT_MAX) {
49 if (!allow_zero &&
value == 0) {
60 memcpy(copy_str, data, len);
kmp_str_ref(const char *str)
bool consume_front(kmp_str_ref prefix)
Check if the string starts with the given prefix and remove it from the string afterwards.
char * copy() const
Get an own duplicate of the string.
bool consume_integer(int &value, bool allow_zero=true, bool allow_negative=false)
Start consuming an integer from the start of the string and remove it from the string afterwards.
size_t count_while(const Fn &predicate) const
Count the number of characters in the string while the predicate returns true.
void drop_front(size_t n)
Drop the first n characters from the string.
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
#define KMP_INTERNAL_MALLOC(sz)
int __kmp_basic_str_to_int(char const *str, size_t maxlen)