|
rapidyaml 0.14.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. | |
| basic_substring (C *s_, size_t len_) noexcept | |
| Construct from a pointer and length. | |
| basic_substring (C *beg_, C *end_) noexcept | |
| Construct from two pointers. | |
| template<class CharPtr, typename std::enable_if< can_borrow_char_ptr< CharPtr, C >::value, int >::type = 0> | |
| basic_substring (CharPtr s_) noexcept | |
| Construct from a C-string (zero-terminated string). | |
| template<size_t N> | |
| void | assign (C(&s_)[N]) noexcept |
| Assign from an array. | |
| void | assign (C *s_, size_t len_) noexcept |
| Assign from a pointer and length. | |
| void | assign (C *beg_, C *end_) noexcept |
| Assign from two pointers. | |
| template<class CharPtr, typename std::enable_if< is_compatible_char_ptr< CharPtr, C >::value, int >::type = 0> | |
| void | assign (CharPtr s_) noexcept |
| Assign from a C-string (zero-terminated string of type const C* or C*). | |
| template<size_t N> | |
| basic_substring & | operator= (C(&s_)[N]) noexcept |
| Assign from an array. | |
| template<class CharPtr, typename std::enable_if< is_compatible_char_ptr< CharPtr, C >::value, int >::type = 0> | |
| basic_substring & | operator= (CharPtr s_) noexcept |
| Assign from a C-string (zero-terminated string of type const C* or C*). | |
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 |
| template<class CharPtr> | |
| auto | compare (CharPtr c_str) const noexcept -> typename std::enable_if< is_compatible_char_ptr< CharPtr, C >::value, int >::type |
| template<class U> | |
| int | compare (basic_substring< U > 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(&arr)[N]) const noexcept |
| template<size_t N> | |
| bool | operator!= (const char(&arr)[N]) const noexcept |
| template<size_t N> | |
| bool | operator< (const char(&arr)[N]) const noexcept |
| template<size_t N> | |
| bool | operator> (const char(&arr)[N]) const noexcept |
| template<size_t N> | |
| bool | operator<= (const char(&arr)[N]) const noexcept |
| template<size_t N> | |
| bool | operator>= (const char(&arr)[N]) const noexcept |
| template<class CharPtr> | |
| auto | operator== (CharPtr c_str) const noexcept -> typename std::enable_if< is_compatible_char_ptr< CharPtr, C >::value, int >::type |
| template<class CharPtr> | |
| auto | operator!= (CharPtr c_str) const noexcept -> typename std::enable_if< is_compatible_char_ptr< CharPtr, C >::value, int >::type |
| template<class CharPtr> | |
| auto | operator< (CharPtr c_str) const noexcept -> typename std::enable_if< is_compatible_char_ptr< CharPtr, C >::value, int >::type |
| template<class CharPtr> | |
| auto | operator> (CharPtr c_str) const noexcept -> typename std::enable_if< is_compatible_char_ptr< CharPtr, C >::value, int >::type |
| template<class CharPtr> | |
| auto | operator<= (CharPtr c_str) const noexcept -> typename std::enable_if< is_compatible_char_ptr< CharPtr, C >::value, int >::type |
| template<class CharPtr> | |
| auto | operator>= (CharPtr c_str) const noexcept -> typename std::enable_if< is_compatible_char_ptr< CharPtr, C >::value, int >::type |
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) | |
| bool | is_super (ro_substr const that) const noexcept |
| true if that is a substring of *this (ie, from the same buffer) | |
| bool | overlaps (ro_substr const that) const noexcept |
| true if there is overlap of at least one element between that and *this | |
| basic_substring | sub (size_t first) const noexcept |
| return [first,len[ | |
| basic_substring | sub (size_t first, size_t num) const noexcept |
| return [first,first+num[. | |
| basic_substring | range (size_t first, size_t last=npos) const noexcept |
| return [first,last[. | |
| basic_substring | first (size_t num) const noexcept |
return the first num elements: [0,num[ | |
| basic_substring | last (size_t num) const noexcept |
return the last num elements: [len-num,len[ | |
| 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. | |
| basic_substring | left_of (size_t pos) const noexcept |
| return [0, pos[ . | |
| basic_substring | left_of (size_t pos, bool include_pos) const noexcept |
| return [0, pos+include_pos[ . | |
| basic_substring | right_of (size_t pos) const noexcept |
| return [pos+1, len[ | |
| basic_substring | right_of (size_t pos, bool include_pos) const noexcept |
| return [pos+!include_pos, len[ | |
| 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 | |
| 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 | |
Removing characters (trim()) / patterns (strip()) from the tips of the string | |
| basic_substring | triml (const C c) const |
| trim left | |
| basic_substring | triml (ro_substr chars) const |
| trim left ANY of the characters. | |
| basic_substring | trimr (const C c) const |
| trim the character c from the right | |
| basic_substring | trimr (ro_substr chars) const |
| trim right ANY of the characters | |
| basic_substring | trim (const C c) const |
| trim the character c left and right | |
| basic_substring | trim (ro_substr const chars) const |
| trim left and right ANY of the characters | |
| basic_substring | stripl (ro_substr pattern) const |
| remove a pattern from the left | |
| basic_substring | stripr (ro_substr pattern) const |
| remove a pattern from the right | |
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 | |
| size_t | count (ro_substr c, size_t pos=0) const |
| count the number of occurrences of s | |
| 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 | |
| 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 | |
| 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 noexcept |
true if the first character of the string is c | |
| bool | begins_with (const C c, size_t num) const noexcept |
true if the first num characters of the string are c | |
| bool | begins_with (ro_substr pattern) const noexcept |
true if the string begins with the given pattern | |
| bool | begins_with_any (ro_substr chars) const noexcept |
true if the first character of the string is any of the given chars | |
| bool | ends_with (const C c) const noexcept |
true if the last character of the string is c | |
| bool | ends_with (const C c, const size_t num) const noexcept |
true if the last num characters of the string are c | |
| bool | ends_with (ro_substr pattern) const noexcept |
true if the string ends with the given pattern | |
| bool | ends_with_any (ro_substr chars) const noexcept |
true if the last character of the string is any of the given chars | |
| 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. | |
| basic_substring | pair_range_esc (CC open_close, CC escape=CC('\\')) |
| get the range delimited by a single open-close character (eg, quotes). | |
| 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. | |
| 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) | |
| template<typename U = C> | |
| auto | toupper () -> typename std::enable_if< ! std::is_const< U >::value, void >::type |
| convert the string to upper-case | |
| template<typename U = C> | |
| auto | tolower () -> typename std::enable_if< !std::is_const< U >::value, void >::type |
| convert the string to lower-case | |
| template<typename U = C> | |
| auto | fill (C val) -> typename std::enable_if< !std::is_const< U >::value, void >::type |
fill the entire contents with the given val | |
| template<typename U = C> | |
| auto | copy_from (ro_substr that) -> typename std::enable_if< !std::is_const< U >::value, void >::type |
| copy a string to this substr, starting at 0 | |
| template<typename U = C> | |
| auto | copy_from (ro_substr that, size_t ifirst, size_t num=npos) -> typename std::enable_if< !std::is_const< U >::value, void >::type |
| copy a string to this substr, starting at a specified given position | |
| template<typename U = C> | |
| auto | reverse () -> typename std::enable_if< !std::is_const< U >::value, void >::type |
| reverse in place | |
| template<typename U = C> | |
| auto | reverse_sub (size_t ifirst, size_t num) -> typename std::enable_if< !std::is_const< U >::value, void >::type |
| revert a subpart in place | |
| template<typename U = C> | |
| auto | reverse_range (size_t ifirst, size_t ilast) -> typename std::enable_if< !std::is_const< U >::value, void >::type |
| revert a range in place | |
| template<typename U = C> | |
| auto | erase (size_t pos, size_t num) -> typename std::enable_if< !std::is_const< U >::value, basic_substring >::type |
| erase part of the string. | |
| template<typename U = C> | |
| auto | erase_range (size_t first, size_t last) -> typename std::enable_if< !std::is_const< U >::value, basic_substring >::type |
| template<typename U = C> | |
| auto | erase (ro_substr sub) -> typename std::enable_if< !std::is_const< U >::value, basic_substring >::type |
| erase a part of the string. | |
| template<typename U = C> | |
| auto | replace (C value, C repl, size_t pos=0) -> typename std::enable_if< ! std::is_const< U >::value, size_t >::type |
replace every occurrence of character value with the character repl | |
| template<typename U = C> | |
| auto | replace (ro_substr chars, C repl, size_t pos=0) -> typename std::enable_if< ! std::is_const< U >::value, size_t >::type |
replace every occurrence of each character in value with the character repl. | |
| 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. | |
Public Attributes | |
| C * | str |
| a restricted pointer to the first character of the substring | |
| size_t | len |
| the length of the substring | |
Types | |
| enum | : size_t { npos = (size_t)-1 , NONE = (size_t)-1 } |
| using | CC = typename std::add_const<C>::type |
| CC=const char. | |
| using | NCC_ = typename std::remove_const<C>::type |
| NCC_=non const char. | |
| using | ro_substr = basic_substring<CC> |
| using | rw_substr = basic_substring<NCC_> |
| using | value_type = C |
| 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 from substr (of C) to csubstr (of const C) | |
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. | |
| split_proxy | split (C sep, size_t start_pos=0) const |
| a view into the splits | |
| basic_substring | pop_right (C sep=C('/'), bool skip_empty=false) const |
| pop right: return the first split from the right. | |
| basic_substring | pop_left (C sep=C('/'), bool skip_empty=false) const |
| return the first split from the left. | |
| basic_substring | gpop_left (C sep=C('/'), bool skip_empty=false) const |
| greedy pop left. | |
| basic_substring | gpop_right (C sep=C('/'), bool skip_empty=false) const |
| greedy pop right. | |
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 | |
| basic_substring | first_uint_span () const |
| get the first span which can be interpreted as an unsigned integer | |
| basic_substring | first_int_span () const |
| get the first span which can be interpreted as a signed integer | |
| 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 | |
| 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 | |
| static constexpr C4_CONST bool | _is_hex_char (char c) noexcept |
| true if the character is in [0-9a-fA-F] | |
a non-owning string-view, consisting of a character pointer and a length.
Definition at line 211 of file substr.hpp.
| using c4::basic_substring< C >::CC = typename std::add_const<C>::type |
CC=const char.
Definition at line 225 of file substr.hpp.
| using c4::basic_substring< C >::NCC_ = typename std::remove_const<C>::type |
NCC_=non const char.
Definition at line 226 of file substr.hpp.
| using c4::basic_substring< C >::ro_substr = basic_substring<CC> |
Definition at line 228 of file substr.hpp.
| using c4::basic_substring< C >::rw_substr = basic_substring<NCC_> |
Definition at line 229 of file substr.hpp.
| using c4::basic_substring< C >::value_type = C |
Definition at line 231 of file substr.hpp.
| using c4::basic_substring< C >::char_type = C |
Definition at line 232 of file substr.hpp.
| using c4::basic_substring< C >::size_type = size_t |
Definition at line 233 of file substr.hpp.
| using c4::basic_substring< C >::iterator = C* |
Definition at line 235 of file substr.hpp.
| using c4::basic_substring< C >::const_iterator = CC* |
Definition at line 236 of file substr.hpp.
| using c4::basic_substring< C >::split_proxy = split_proxy_impl |
Definition at line 1910 of file substr.hpp.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| npos | |
| NONE | |
Definition at line 238 of file substr.hpp.
|
inlineconstexprnoexcept |
Definition at line 255 of file substr.hpp.
|
inlinedefaultnoexcept |
|
inlinedefaultnoexcept |
|
inlinenoexcept |
Definition at line 259 of file substr.hpp.
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Construct from a C-string (zero-terminated string).
Definition at line 293 of file substr.hpp.
|
inlinenoexcept |
convert automatically from substr (of C) to csubstr (of const C)
Definition at line 242 of file substr.hpp.
|
inlinedefaultnoexcept |
|
inlinedefaultnoexcept |
|
inlinenoexcept |
Definition at line 263 of file substr.hpp.
|
inlinenoexcept |
Definition at line 265 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Assign from a C-string (zero-terminated string of type const C* or C*).
Definition at line 315 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
Assign from a C-string (zero-terminated string of type const C* or C*).
Definition at line 337 of file substr.hpp.
|
inlinenoexcept |
Definition at line 355 of file substr.hpp.
|
inlinenoexcept |
Definition at line 356 of file substr.hpp.
|
inlinenoexcept |
Definition at line 357 of file substr.hpp.
|
inlinenoexcept |
Definition at line 358 of file substr.hpp.
|
inlinenoexcept |
Definition at line 360 of file substr.hpp.
|
inlinenoexcept |
Definition at line 361 of file substr.hpp.
|
inlinenoexcept |
Definition at line 363 of file substr.hpp.
|
inlinenoexcept |
Definition at line 364 of file substr.hpp.
|
inlinenoexcept |
Definition at line 366 of file substr.hpp.
|
inlinenoexcept |
Definition at line 367 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 394 of file substr.hpp.
|
inlinenoexcept |
Definition at line 428 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 440 of file substr.hpp.
|
inlinenoexcept |
Definition at line 441 of file substr.hpp.
|
inlinenoexcept |
Definition at line 443 of file substr.hpp.
|
inlinenoexcept |
Definition at line 444 of file substr.hpp.
|
inlinenoexcept |
Definition at line 445 of file substr.hpp.
|
inlinenoexcept |
Definition at line 446 of file substr.hpp.
|
inlinenoexcept |
Definition at line 447 of file substr.hpp.
|
inlinenoexcept |
Definition at line 448 of file substr.hpp.
|
inlinenoexcept |
Definition at line 450 of file substr.hpp.
|
inlinenoexcept |
Definition at line 451 of file substr.hpp.
|
inlinenoexcept |
Definition at line 452 of file substr.hpp.
|
inlinenoexcept |
Definition at line 453 of file substr.hpp.
|
inlinenoexcept |
Definition at line 454 of file substr.hpp.
|
inlinenoexcept |
Definition at line 455 of file substr.hpp.
|
inlinenoexcept |
Definition at line 457 of file substr.hpp.
|
inlinenoexcept |
Definition at line 458 of file substr.hpp.
|
inlinenoexcept |
Definition at line 459 of file substr.hpp.
|
inlinenoexcept |
Definition at line 460 of file substr.hpp.
|
inlinenoexcept |
Definition at line 461 of file substr.hpp.
|
inlinenoexcept |
Definition at line 462 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
true if *this is a substring of that (ie, from the same buffer)
Definition at line 479 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
return [first,len[
Definition at line 503 of file substr.hpp.
|
inlinenoexcept |
return [first,first+num[.
If num==npos, return [first,len[
Definition at line 510 of file substr.hpp.
|
inlinenoexcept |
return [first,last[.
If last==npos, return [first,len[
Definition at line 520 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
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 548 of file substr.hpp.
|
inlinenoexcept |
return [0, pos[ .
Same as .first(pos), but provided for compatibility with .right_of()
Definition at line 557 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 566 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 596 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 610 of file substr.hpp.
|
inline |
|
inline |
|
inline |
trim the character c from the right
Definition at line 654 of file substr.hpp.
|
inline |
|
inline |
trim the character c left and right
Definition at line 678 of file substr.hpp.
|
inline |
|
inline |
remove a pattern from the left
Definition at line 691 of file substr.hpp.
|
inline |
remove a pattern from the right
Definition at line 700 of file substr.hpp.
|
inline |
Definition at line 714 of file substr.hpp.
|
inline |
Definition at line 718 of file substr.hpp.
|
inline |
count the number of occurrences of c
Definition at line 745 of file substr.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 795 of file substr.hpp.
|
inline |
Definition at line 801 of file substr.hpp.
|
inline |
|
inline |
|
inline |
Definition at line 820 of file substr.hpp.
|
inlinenoexcept |
true if the first character of the string is c
Definition at line 851 of file substr.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Definition at line 935 of file substr.hpp.
|
inline |
Definition at line 947 of file substr.hpp.
|
inline |
Definition at line 961 of file substr.hpp.
|
inline |
Definition at line 976 of file substr.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1038 of file substr.hpp.
|
inline |
Definition at line 1059 of file substr.hpp.
|
inline |
Definition at line 1081 of file substr.hpp.
|
inline |
Definition at line 1102 of file substr.hpp.
|
inline |
get the range delimited by an open-close pair of characters.
Definition at line 1136 of file substr.hpp.
|
inline |
get the range delimited by a single open-close character (eg, quotes).
Definition at line 1151 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 1172 of file substr.hpp.
|
inline |
Definition at line 1195 of file substr.hpp.
|
inline |
Definition at line 1217 of file substr.hpp.
|
inline |
Definition at line 1232 of file substr.hpp.
|
inline |
Definition at line 1243 of file substr.hpp.
|
inline |
Definition at line 1256 of file substr.hpp.
|
inline |
get the first span consisting exclusively of non-empty characters
Definition at line 1266 of file substr.hpp.
|
inline |
get the first span which can be interpreted as an unsigned integer
Definition at line 1278 of file substr.hpp.
|
inline |
get the first span which can be interpreted as a signed integer
Definition at line 1290 of file substr.hpp.
|
inline |
Definition at line 1299 of file substr.hpp.
|
inline |
get the first span which can be interpreted as a real (floating-point) number
Definition at line 1365 of file substr.hpp.
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 1443 of file substr.hpp.
|
inlinenoexcept |
Definition at line 1530 of file substr.hpp.
|
inlinenoexcept |
Definition at line 1620 of file substr.hpp.
|
inlinenoexcept |
Definition at line 1710 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 1810 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 1926 of file substr.hpp.
|
inline |
return the first split from the left.
Use gpop_right() to get the reciprocal part.
Definition at line 1979 of file substr.hpp.
|
inline |
greedy pop left.
eg, csubstr("a/b/c").gpop_left('/')="c"
Definition at line 2034 of file substr.hpp.
|
inline |
greedy pop right.
eg, csubstr("a/b/c").gpop_right('/')="a"
Definition at line 2056 of file substr.hpp.
|
inline |
|
inline |
Definition at line 2091 of file substr.hpp.
|
inline |
Definition at line 2098 of file substr.hpp.
|
inline |
Definition at line 2103 of file substr.hpp.
|
inline |
Definition at line 2108 of file substr.hpp.
|
inline |
Definition at line 2113 of file substr.hpp.
|
inline |
convert the string to upper-case
Definition at line 2128 of file substr.hpp.
|
inline |
convert the string to lower-case
Definition at line 2140 of file substr.hpp.
|
inline |
|
inline |
copy a string to this substr, starting at 0
Definition at line 2166 of file substr.hpp.
|
inline |
copy a string to this substr, starting at a specified given position
Definition at line 2181 of file substr.hpp.
|
inline |
reverse in place
Definition at line 2200 of file substr.hpp.
|
inline |
revert a subpart in place
Definition at line 2210 of file substr.hpp.
|
inline |
revert a range in place
Definition at line 2222 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 "0125678989"
Definition at line 2237 of file substr.hpp.
|
inline |
Definition at line 2248 of file substr.hpp.
|
inline |
erase a part of the string.
sub must be a substring of this string Definition at line 2259 of file substr.hpp.
|
inline |
replace every occurrence of character value with the character repl
Definition at line 2273 of file substr.hpp.
|
inline |
replace every occurrence of each character in value with the character repl.
Definition at line 2291 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 2310 of file substr.hpp.
| C* c4::basic_substring< C >::str |
a restricted pointer to the first character of the substring
Definition at line 216 of file substr.hpp.
| size_t c4::basic_substring< C >::len |
the length of the substring
Definition at line 218 of file substr.hpp.