|
rapidyaml
0.13.0
parse and emit YAML, and do it fast
|
a non-owning string-view, consisting of a character pointer and a length. More...
#include <substr.hpp>
Classes | |
| struct | first_of_any_result |
Public Member Functions | |
Default construction and assignment | |
| constexpr | basic_substring () noexcept |
| basic_substring (basic_substring const &) noexcept=default | |
| basic_substring (basic_substring &&) noexcept=default | |
| basic_substring (std::nullptr_t) noexcept | |
| basic_substring & | operator= (basic_substring const &) noexcept=default |
| basic_substring & | operator= (basic_substring &&) noexcept=default |
| basic_substring & | operator= (std::nullptr_t) noexcept |
| void | clear () noexcept |
Construction and assignment from characters with the same type | |
| template<size_t N> | |
| constexpr | basic_substring (C(&s_)[N]) noexcept |
| Construct from an array. More... | |
| basic_substring (C *s_, size_t len_) noexcept | |
| Construct from a pointer and length. More... | |
| basic_substring (C *beg_, C *end_) noexcept | |
| Construct from two pointers. More... | |
| template<class U , typename std::enable_if< std::is_same< U, C * >::value||std::is_same< U, NCC_ * >::value, int >::type = 0> | |
| basic_substring (U s_) noexcept | |
| Construct from a C-string (zero-terminated string) More... | |
| template<size_t N> | |
| void | assign (C(&s_)[N]) noexcept |
| Assign from an array. More... | |
| void | assign (C *s_, size_t len_) noexcept |
| Assign from a pointer and length. More... | |
| void | assign (C *beg_, C *end_) noexcept |
| Assign from two pointers. More... | |
| template<class U , typename std::enable_if< std::is_same< U, C * >::value||std::is_same< U, NCC_ * >::value, int >::type = 0> | |
| void | assign (U s_) noexcept |
| Assign from a C-string (zero-terminated string of type const C* or C*) More... | |
| template<size_t N> | |
| basic_substring & | operator= (C(&s_)[N]) noexcept |
| Assign from an array. More... | |
| template<class U , typename std::enable_if< std::is_same< U, C * >::value||std::is_same< U, NCC_ * >::value, int >::type = 0> | |
| basic_substring & | operator= (U s_) noexcept |
| Assign from a C-string (zero-terminated string of type const C* or C*) More... | |
Standard accessor methods | |
| bool | has_str () const noexcept |
| bool | empty () const noexcept |
| bool | not_empty () const noexcept |
| size_t | size () const noexcept |
| iterator | begin () noexcept |
| iterator | end () noexcept |
| const_iterator | begin () const noexcept |
| const_iterator | end () const noexcept |
| C * | data () noexcept |
| C const * | data () const noexcept |
| C & | operator[] (size_t i) noexcept |
| C const & | operator[] (size_t i) const noexcept |
| C & | front () noexcept |
| C const & | front () const noexcept |
| C & | back () noexcept |
| C const & | back () const noexcept |
Comparison methods | |
| int | compare (C const c) const noexcept |
| int | compare (C const *that, size_t sz) const noexcept |
| int | compare (ro_substr const that) const noexcept |
| bool | operator== (std::nullptr_t) const noexcept |
| bool | operator!= (std::nullptr_t) const noexcept |
| bool | operator== (C const c) const noexcept |
| bool | operator!= (C const c) const noexcept |
| bool | operator< (C const c) const noexcept |
| bool | operator> (C const c) const noexcept |
| bool | operator<= (C const c) const noexcept |
| bool | operator>= (C const c) const noexcept |
| template<class U > | |
| bool | operator== (basic_substring< U > const that) const noexcept |
| template<class U > | |
| bool | operator!= (basic_substring< U > const that) const noexcept |
| template<class U > | |
| bool | operator< (basic_substring< U > const that) const noexcept |
| template<class U > | |
| bool | operator> (basic_substring< U > const that) const noexcept |
| template<class U > | |
| bool | operator<= (basic_substring< U > const that) const noexcept |
| template<class U > | |
| bool | operator>= (basic_substring< U > const that) const noexcept |
| template<size_t N> | |
| bool | operator== (const char(&that)[N]) const noexcept |
| template<size_t N> | |
| bool | operator!= (const char(&that)[N]) const noexcept |
| template<size_t N> | |
| bool | operator< (const char(&that)[N]) const noexcept |
| template<size_t N> | |
| bool | operator> (const char(&that)[N]) const noexcept |
| template<size_t N> | |
| bool | operator<= (const char(&that)[N]) const noexcept |
| template<size_t N> | |
| bool | operator>= (const char(&that)[N]) const noexcept |
Sub-selection methods | |
| bool | is_sub (ro_substr const that) const noexcept |
| true if *this is a substring of that (ie, from the same buffer) More... | |
| bool | is_super (ro_substr const that) const noexcept |
| true if that is a substring of *this (ie, from the same buffer) More... | |
| bool | overlaps (ro_substr const that) const noexcept |
| true if there is overlap of at least one element between that and *this More... | |
| basic_substring | sub (size_t first) const noexcept |
| return [first,len[ More... | |
| basic_substring | sub (size_t first, size_t num) const noexcept |
| return [first,first+num[. More... | |
| basic_substring | range (size_t first, size_t last=npos) const noexcept |
| return [first,last[. More... | |
| basic_substring | first (size_t num) const noexcept |
return the first num elements: [0,num[ More... | |
| basic_substring | last (size_t num) const noexcept |
return the last num elements: [len-num,len[ More... | |
| basic_substring | offs (size_t left, size_t right) const noexcept |
| offset from the ends: return [left,len-right[ ; ie, trim a number of characters from the left and right. More... | |
| basic_substring | left_of (size_t pos) const noexcept |
| return [0, pos[ . More... | |
| basic_substring | left_of (size_t pos, bool include_pos) const noexcept |
| return [0, pos+include_pos[ . More... | |
| basic_substring | right_of (size_t pos) const noexcept |
| return [pos+1, len[ More... | |
| basic_substring | right_of (size_t pos, bool include_pos) const noexcept |
| return [pos+!include_pos, len[ More... | |
| basic_substring | left_of (ro_substr const subs) const noexcept |
given subs a substring of the current string, get the portion of the current string to the left of it More... | |
| basic_substring | right_of (ro_substr const subs) const noexcept |
given subs a substring of the current string, get the portion of the current string to the right of it More... | |
Removing characters (trim()) / patterns (strip()) from the tips of the string | |
| basic_substring | triml (const C c) const |
| trim left More... | |
| basic_substring | triml (ro_substr chars) const |
| trim left ANY of the characters. More... | |
| basic_substring | trimr (const C c) const |
| trim the character c from the right More... | |
| basic_substring | trimr (ro_substr chars) const |
| trim right ANY of the characters More... | |
| basic_substring | trim (const C c) const |
| trim the character c left and right More... | |
| basic_substring | trim (ro_substr const chars) const |
| trim left and right ANY of the characters More... | |
| basic_substring | stripl (ro_substr pattern) const |
| remove a pattern from the left More... | |
| basic_substring | stripr (ro_substr pattern) const |
| remove a pattern from the right More... | |
Lookup methods | |
| size_t | find (const C c, size_t start_pos=0) const |
| size_t | find (ro_substr pattern, size_t start_pos=0) const |
| size_t | count (const C c, size_t pos=0) const |
| count the number of occurrences of c More... | |
| size_t | count (ro_substr c, size_t pos=0) const |
| count the number of occurrences of s More... | |
| basic_substring | select (const C c, size_t pos=0) const |
get the substr consisting of the first occurrence of c after pos, or an empty substr if none occurs More... | |
| basic_substring | select (ro_substr pattern, size_t pos=0) const |
get the substr consisting of the first occurrence of pattern after pos, or an empty substr if none occurs More... | |
| first_of_any_result | first_of_any (ro_substr s0, ro_substr s1) const |
| first_of_any_result | first_of_any (ro_substr s0, ro_substr s1, ro_substr s2) const |
| first_of_any_result | first_of_any (ro_substr s0, ro_substr s1, ro_substr s2, ro_substr s3) const |
| first_of_any_result | first_of_any (ro_substr s0, ro_substr s1, ro_substr s2, ro_substr s3, ro_substr s4) const |
| template<class It > | |
| first_of_any_result | first_of_any_iter (It first_span, It last_span) const |
| bool | begins_with (const C c) const |
true if the first character of the string is c More... | |
| bool | begins_with (const C c, size_t num) const |
true if the first num characters of the string are c More... | |
| bool | begins_with (ro_substr pattern) const |
true if the string begins with the given pattern More... | |
| bool | begins_with_any (ro_substr chars) const |
true if the first character of the string is any of the given chars More... | |
| bool | ends_with (const C c) const |
true if the last character of the string is c More... | |
| bool | ends_with (const C c, size_t num) const |
true if the last num characters of the string are c More... | |
| bool | ends_with (ro_substr pattern) const |
true if the string ends with the given pattern More... | |
| bool | ends_with_any (ro_substr chars) const |
true if the last character of the string is any of the given chars More... | |
| size_t | first_of (const C c, size_t start=0) const |
| size_t | last_of (const C c, size_t start=npos) const |
| size_t | first_of (ro_substr chars, size_t start=0) const |
| size_t | last_of (ro_substr chars, size_t start=npos) const |
| size_t | first_not_of (const C c) const |
| size_t | first_not_of (const C c, size_t start) const |
| size_t | last_not_of (const C c) const |
| size_t | last_not_of (const C c, size_t start) const |
| size_t | first_not_of (ro_substr chars) const |
| size_t | first_not_of (ro_substr chars, size_t start) const |
| size_t | last_not_of (ro_substr chars) const |
| size_t | last_not_of (ro_substr chars, size_t start) const |
Range lookup methods | |
| basic_substring | pair_range (CC open, CC close) const |
| get the range delimited by an open-close pair of characters. More... | |
| basic_substring | pair_range_esc (CC open_close, CC escape=CC('\\')) |
| get the range delimited by a single open-close character (eg, quotes). More... | |
| basic_substring | pair_range_nested (CC open, CC close) const |
| get the range delimited by an open-close pair of characters, with possibly nested occurrences. More... | |
| basic_substring | unquoted () const |
Path-like manipulation methods | |
| basic_substring | basename (C sep=C('/')) const |
| basic_substring | dirname (C sep=C('/')) const |
| basic_substring | name_wo_extshort () const |
| basic_substring | name_wo_extlong () const |
| basic_substring | extshort () const |
| basic_substring | extlong () const |
Content-modification methods (only for non-const C) | |
| void | toupper () |
| convert the string to upper-case More... | |
| void | tolower () |
| convert the string to lower-case More... | |
| void | fill (C val) |
fill the entire contents with the given val More... | |
| void | copy_from (ro_substr that) |
| copy a string to this substr, starting at 0 More... | |
| void | copy_from (ro_substr that, size_t ifirst, size_t num=npos) |
| copy a string to this substr, starting at a specified given position More... | |
| void | reverse () |
| reverse in place More... | |
| void | reverse_sub (size_t ifirst, size_t num) |
| revert a subpart in place More... | |
| void | reverse_range (size_t ifirst, size_t ilast) |
| revert a range in place More... | |
| basic_substring | erase (size_t pos, size_t num) |
| erase part of the string. More... | |
| basic_substring | erase_range (size_t first, size_t last) |
| basic_substring | erase (ro_substr sub) |
| erase a part of the string. More... | |
| size_t | replace (C value, C repl, size_t pos=0) |
replace every occurrence of character value with the character repl More... | |
| size_t | replace (ro_substr chars, C repl, size_t pos=0) |
replace every occurrence of each character in value with the character repl. More... | |
| size_t | replace_all (rw_substr dst, ro_substr pattern, ro_substr repl, size_t pos=0) const |
replace pattern with repl, and write the result into dst. More... | |
Public Attributes | |
| C * | str |
| a restricted pointer to the first character of the substring More... | |
| size_t | len |
| the length of the substring More... | |
Types | |
| enum | : size_t { npos = (size_t)-1 , NONE = (size_t)-1 } |
| using | CC = typename std::add_const< C >::type |
| CC=const char. More... | |
| using | NCC_ = typename std::remove_const< C >::type |
| NCC_=non const char. More... | |
| using | ro_substr = basic_substring< CC > |
| using | rw_substr = basic_substring< NCC_ > |
| using | char_type = C |
| using | size_type = size_t |
| using | iterator = C * |
| using | const_iterator = CC * |
| template<class U = C> | |
| operator typename std::enable_if<!std::is_const< U >::value, ro_substr const & >::type () const noexcept | |
| convert automatically to substring of const C More... | |
Splitting methods | |
| using | split_proxy = split_proxy_impl |
| bool | next_split (C sep, size_t *start_pos, basic_substring *out) const |
| returns true if the string has not been exhausted yet, meaning it's ok to call next_split() again. More... | |
| split_proxy | split (C sep, size_t start_pos=0) const |
| a view into the splits More... | |
| basic_substring | pop_right (C sep=C('/'), bool skip_empty=false) const |
| pop right: return the first split from the right. More... | |
| basic_substring | pop_left (C sep=C('/'), bool skip_empty=false) const |
| return the first split from the left. More... | |
| basic_substring | gpop_left (C sep=C('/'), bool skip_empty=false) const |
| greedy pop left. More... | |
| basic_substring | gpop_right (C sep=C('/'), bool skip_empty=false) const |
| greedy pop right. More... | |
Number-matching query methods | |
| bool | is_number () const |
| bool | is_real () const |
| bool | is_integer () const |
| bool | is_unsigned_integer () const |
| basic_substring | first_non_empty_span () const |
| get the first span consisting exclusively of non-empty characters More... | |
| basic_substring | first_uint_span () const |
| get the first span which can be interpreted as an unsigned integer More... | |
| basic_substring | first_int_span () const |
| get the first span which can be interpreted as a signed integer More... | |
| basic_substring | _first_integral_span (size_t skip_start) const |
| basic_substring | first_real_span () const |
| get the first span which can be interpreted as a real (floating-point) number More... | |
| basic_substring | _word_follows (size_t pos, csubstr word) const noexcept |
| basic_substring | _first_real_span_dec (size_t pos) const noexcept |
| basic_substring | _first_real_span_hex (size_t pos) const noexcept |
| basic_substring | _first_real_span_bin (size_t pos) const noexcept |
| basic_substring | _first_real_span_oct (size_t pos) const noexcept |
| static constexpr C4_CONST bool | _is_delim_char (char c) noexcept |
| true if the character is a delimiter character at the end More... | |
| static constexpr C4_CONST bool | _is_hex_char (char c) noexcept |
| true if the character is in [0-9a-fA-F] More... | |
a non-owning string-view, consisting of a character pointer and a length.
Definition at line 68 of file substr.hpp.
| using c4::basic_substring< C >::CC = typename std::add_const<C>::type |
CC=const char.
Definition at line 82 of file substr.hpp.
| using c4::basic_substring< C >::NCC_ = typename std::remove_const<C>::type |
NCC_=non const char.
Definition at line 83 of file substr.hpp.
| using c4::basic_substring< C >::ro_substr = basic_substring<CC> |
Definition at line 85 of file substr.hpp.
| using c4::basic_substring< C >::rw_substr = basic_substring<NCC_> |
Definition at line 86 of file substr.hpp.
| using c4::basic_substring< C >::char_type = C |
Definition at line 88 of file substr.hpp.
| using c4::basic_substring< C >::size_type = size_t |
Definition at line 89 of file substr.hpp.
| using c4::basic_substring< C >::iterator = C* |
Definition at line 91 of file substr.hpp.
| using c4::basic_substring< C >::const_iterator = CC* |
Definition at line 92 of file substr.hpp.
| using c4::basic_substring< C >::split_proxy = split_proxy_impl |
Definition at line 1766 of file substr.hpp.
| anonymous enum : size_t |
|
inlineconstexprnoexcept |
Definition at line 110 of file substr.hpp.
|
inlinedefaultnoexcept |
|
inlinedefaultnoexcept |
|
inlinenoexcept |
Definition at line 114 of file substr.hpp.
|
inlineconstexprnoexcept |
Construct from an array.
Definition at line 133 of file substr.hpp.
|
inlinenoexcept |
Construct from a pointer and length.
Definition at line 136 of file substr.hpp.
|
inlinenoexcept |
Construct from two pointers.
Definition at line 140 of file substr.hpp.
|
inlinenoexcept |
Construct from a C-string (zero-terminated string)
Definition at line 148 of file substr.hpp.
|
inlinenoexcept |
|
inlinedefaultnoexcept |
|
inlinedefaultnoexcept |
|
inlinenoexcept |
Definition at line 118 of file substr.hpp.
|
inlinenoexcept |
Definition at line 120 of file substr.hpp.
|
inlinenoexcept |
Assign from an array.
Definition at line 154 of file substr.hpp.
|
inlinenoexcept |
Assign from a pointer and length.
Definition at line 157 of file substr.hpp.
|
inlinenoexcept |
Assign from two pointers.
Definition at line 161 of file substr.hpp.
|
inlinenoexcept |
Assign from a C-string (zero-terminated string of type const C* or C*)
Definition at line 169 of file substr.hpp.
|
inlinenoexcept |
Assign from an array.
Definition at line 174 of file substr.hpp.
|
inlinenoexcept |
Assign from a C-string (zero-terminated string of type const C* or C*)
Definition at line 182 of file substr.hpp.
|
inlinenoexcept |
Definition at line 191 of file substr.hpp.
|
inlinenoexcept |
Definition at line 192 of file substr.hpp.
|
inlinenoexcept |
Definition at line 193 of file substr.hpp.
|
inlinenoexcept |
Definition at line 194 of file substr.hpp.
|
inlinenoexcept |
Definition at line 196 of file substr.hpp.
|
inlinenoexcept |
Definition at line 197 of file substr.hpp.
|
inlinenoexcept |
Definition at line 199 of file substr.hpp.
|
inlinenoexcept |
Definition at line 200 of file substr.hpp.
|
inlinenoexcept |
Definition at line 202 of file substr.hpp.
|
inlinenoexcept |
Definition at line 203 of file substr.hpp.
|
inlinenoexcept |
Definition at line 205 of file substr.hpp.
|
inlinenoexcept |
Definition at line 206 of file substr.hpp.
|
inlinenoexcept |
Definition at line 208 of file substr.hpp.
|
inlinenoexcept |
Definition at line 209 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 230 of file substr.hpp.
|
inlinenoexcept |
Definition at line 263 of file substr.hpp.
|
inlinenoexcept |
Definition at line 265 of file substr.hpp.
|
inlinenoexcept |
Definition at line 266 of file substr.hpp.
|
inlinenoexcept |
Definition at line 268 of file substr.hpp.
|
inlinenoexcept |
Definition at line 269 of file substr.hpp.
|
inlinenoexcept |
Definition at line 270 of file substr.hpp.
|
inlinenoexcept |
Definition at line 271 of file substr.hpp.
|
inlinenoexcept |
Definition at line 272 of file substr.hpp.
|
inlinenoexcept |
Definition at line 273 of file substr.hpp.
|
inlinenoexcept |
Definition at line 275 of file substr.hpp.
|
inlinenoexcept |
Definition at line 276 of file substr.hpp.
|
inlinenoexcept |
Definition at line 277 of file substr.hpp.
|
inlinenoexcept |
Definition at line 278 of file substr.hpp.
|
inlinenoexcept |
Definition at line 279 of file substr.hpp.
|
inlinenoexcept |
Definition at line 280 of file substr.hpp.
|
inlinenoexcept |
Definition at line 282 of file substr.hpp.
|
inlinenoexcept |
Definition at line 283 of file substr.hpp.
|
inlinenoexcept |
Definition at line 284 of file substr.hpp.
|
inlinenoexcept |
Definition at line 285 of file substr.hpp.
|
inlinenoexcept |
Definition at line 286 of file substr.hpp.
|
inlinenoexcept |
Definition at line 287 of file substr.hpp.
|
inlinenoexcept |
true if *this is a substring of that (ie, from the same buffer)
Definition at line 297 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
true if there is overlap of at least one element between that and *this
Definition at line 312 of file substr.hpp.
|
inlinenoexcept |
return [first,len[
Definition at line 321 of file substr.hpp.
|
inlinenoexcept |
return [first,first+num[.
If num==npos, return [first,len[
Definition at line 328 of file substr.hpp.
|
inlinenoexcept |
return [first,last[.
If last==npos, return [first,len[
Definition at line 338 of file substr.hpp.
|
inlinenoexcept |
return the first num elements: [0,num[
Definition at line 348 of file substr.hpp.
|
inlinenoexcept |
return the last num elements: [len-num,len[
Definition at line 355 of file substr.hpp.
|
inlinenoexcept |
offset from the ends: return [left,len-right[ ; ie, trim a number of characters from the left and right.
This is equivalent to python's negative list indices.
Definition at line 366 of file substr.hpp.
|
inlinenoexcept |
return [0, pos[ .
Same as .first(pos), but provided for compatibility with .right_of()
Definition at line 375 of file substr.hpp.
|
inlinenoexcept |
return [0, pos+include_pos[ .
Same as .first(pos+1), but provided for compatibility with .right_of()
Definition at line 384 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
given subs a substring of the current string, get the portion of the current string to the left of it
Definition at line 414 of file substr.hpp.
|
inlinenoexcept |
given subs a substring of the current string, get the portion of the current string to the right of it
Definition at line 428 of file substr.hpp.
|
inline |
|
inline |
trim left ANY of the characters.
Definition at line 460 of file substr.hpp.
|
inline |
|
inline |
trim right ANY of the characters
Definition at line 484 of file substr.hpp.
|
inline |
trim the character c left and right
Definition at line 496 of file substr.hpp.
|
inline |
trim left and right ANY of the characters
Definition at line 502 of file substr.hpp.
|
inline |
remove a pattern from the left
Definition at line 509 of file substr.hpp.
|
inline |
remove a pattern from the right
Definition at line 518 of file substr.hpp.
|
inline |
Definition at line 532 of file substr.hpp.
|
inline |
Definition at line 536 of file substr.hpp.
|
inline |
|
inline |
|
inline |
get the substr consisting of the first occurrence of c after pos, or an empty substr if none occurs
Definition at line 591 of file substr.hpp.
|
inline |
get the substr consisting of the first occurrence of pattern after pos, or an empty substr if none occurs
Definition at line 598 of file substr.hpp.
|
inline |
Definition at line 613 of file substr.hpp.
|
inline |
Definition at line 619 of file substr.hpp.
|
inline |
Definition at line 625 of file substr.hpp.
|
inline |
Definition at line 631 of file substr.hpp.
|
inline |
Definition at line 638 of file substr.hpp.
|
inline |
true if the first character of the string is c
Definition at line 669 of file substr.hpp.
|
inline |
true if the first num characters of the string are c
Definition at line 681 of file substr.hpp.
|
inline |
true if the string begins with the given pattern
Definition at line 698 of file substr.hpp.
|
inline |
true if the first character of the string is any of the given chars
Definition at line 715 of file substr.hpp.
|
inline |
true if the last character of the string is c
Definition at line 732 of file substr.hpp.
|
inline |
|
inline |
true if the string ends with the given pattern
Definition at line 755 of file substr.hpp.
|
inline |
true if the last character of the string is any of the given chars
Definition at line 772 of file substr.hpp.
|
inline |
Definition at line 791 of file substr.hpp.
|
inline |
Definition at line 803 of file substr.hpp.
|
inline |
Definition at line 817 of file substr.hpp.
|
inline |
Definition at line 832 of file substr.hpp.
|
inline |
Definition at line 850 of file substr.hpp.
|
inline |
|
inline |
Definition at line 871 of file substr.hpp.
|
inline |
|
inline |
Definition at line 894 of file substr.hpp.
|
inline |
Definition at line 915 of file substr.hpp.
|
inline |
Definition at line 937 of file substr.hpp.
|
inline |
Definition at line 958 of file substr.hpp.
|
inline |
get the range delimited by an open-close pair of characters.
Definition at line 992 of file substr.hpp.
|
inline |
get the range delimited by a single open-close character (eg, quotes).
Definition at line 1007 of file substr.hpp.
|
inline |
get the range delimited by an open-close pair of characters, with possibly nested occurrences.
No checks for escapes are performed.
Definition at line 1028 of file substr.hpp.
|
inline |
Definition at line 1051 of file substr.hpp.
|
inline |
Definition at line 1073 of file substr.hpp.
|
inline |
Definition at line 1088 of file substr.hpp.
|
inline |
Definition at line 1099 of file substr.hpp.
|
inline |
Definition at line 1112 of file substr.hpp.
|
inline |
get the first span consisting exclusively of non-empty characters
Definition at line 1122 of file substr.hpp.
|
inline |
get the first span which can be interpreted as an unsigned integer
Definition at line 1134 of file substr.hpp.
|
inline |
get the first span which can be interpreted as a signed integer
Definition at line 1146 of file substr.hpp.
|
inline |
Definition at line 1155 of file substr.hpp.
|
inline |
get the first span which can be interpreted as a real (floating-point) number
Definition at line 1221 of file substr.hpp.
|
inlinestaticconstexprnoexcept |
true if the character is a delimiter character at the end
Definition at line 1276 of file substr.hpp.
|
inlinestaticconstexprnoexcept |
true if the character is in [0-9a-fA-F]
Definition at line 1284 of file substr.hpp.
|
inlinenoexcept |
Definition at line 1289 of file substr.hpp.
|
inlinenoexcept |
Definition at line 1299 of file substr.hpp.
|
inlinenoexcept |
Definition at line 1386 of file substr.hpp.
|
inlinenoexcept |
Definition at line 1476 of file substr.hpp.
|
inlinenoexcept |
Definition at line 1566 of file substr.hpp.
|
inline |
returns true if the string has not been exhausted yet, meaning it's ok to call next_split() again.
When no instance of sep exists in the string, returns the full string. When the input is an empty string, the output string is the empty string.
Definition at line 1666 of file substr.hpp.
|
inline |
|
inline |
pop right: return the first split from the right.
Use gpop_left() to get the reciprocal part.
Definition at line 1782 of file substr.hpp.
|
inline |
return the first split from the left.
Use gpop_right() to get the reciprocal part.
Definition at line 1835 of file substr.hpp.
|
inline |
greedy pop left.
eg, csubstr("a/b/c").gpop_left('/')="c"
Definition at line 1890 of file substr.hpp.
|
inline |
greedy pop right.
eg, csubstr("a/b/c").gpop_right('/')="a"
Definition at line 1912 of file substr.hpp.
|
inline |
Definition at line 1940 of file substr.hpp.
|
inline |
Definition at line 1947 of file substr.hpp.
|
inline |
Definition at line 1954 of file substr.hpp.
|
inline |
Definition at line 1959 of file substr.hpp.
|
inline |
Definition at line 1964 of file substr.hpp.
|
inline |
Definition at line 1969 of file substr.hpp.
|
inline |
convert the string to upper-case
Definition at line 1983 of file substr.hpp.
|
inline |
convert the string to lower-case
Definition at line 1993 of file substr.hpp.
|
inline |
fill the entire contents with the given val
Definition at line 2005 of file substr.hpp.
|
inline |
copy a string to this substr, starting at 0
Definition at line 2015 of file substr.hpp.
|
inline |
copy a string to this substr, starting at a specified given position
Definition at line 2028 of file substr.hpp.
|
inline |
|
inline |
revert a subpart in place
Definition at line 2053 of file substr.hpp.
|
inline |
revert a range in place
Definition at line 2063 of file substr.hpp.
|
inline |
erase part of the string.
eg, with char s[] = "0123456789", substr(s).erase(3, 2) = "01256789", and s is now "01245678989"
Definition at line 2076 of file substr.hpp.
|
inline |
Definition at line 2085 of file substr.hpp.
|
inline |
erase a part of the string.
sub must be a substring of this string Definition at line 2094 of file substr.hpp.
|
inline |
replace every occurrence of character value with the character repl
Definition at line 2106 of file substr.hpp.
|
inline |
replace every occurrence of each character in value with the character repl.
Definition at line 2122 of file substr.hpp.
|
inline |
replace pattern with repl, and write the result into dst.
pattern and repl don't need equal sizes.
<
<
Definition at line 2140 of file substr.hpp.
| C* c4::basic_substring< C >::str |
a restricted pointer to the first character of the substring
Definition at line 73 of file substr.hpp.
| size_t c4::basic_substring< C >::len |
the length of the substring
Definition at line 75 of file substr.hpp.