You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**Type**|**literal_delimiter**| a single string |
100
-
| |**any_of_delimiter**| any of given characters |
101
-
| |**fixed_delimiter**| fixed length |
102
-
| |**limit_delimiter**| apply given delimiter a limited number of times (not implemented) |
103
-
| |**regex_delimiter**| regular expression |
104
-
| |**char_delimiter**| character position |
105
-
| | | |
106
-
|**Utilities**| char_t **nullchr**() | null char of template character type |
107
-
| | char_t \***nullstr**() | empty character string of template character type |
108
-
| | | |
109
-
|**Observers**| size_t **length**(string_view sv) | length of string |
110
-
| | size_t **size**(string_view sv) | length of string |
111
-
| | bool **is_empty**(string_view sv) | true if string is empty |
112
-
| | bool **contains**(string_view sv, string_view what) | true if string contains given string |
113
-
| | bool **starts_with**(string_view sv, string_view what) | true if string starts with given string |
114
-
| | bool **ends_with**(string_view sv, string_view what) | true if string ends with given string |
115
-
| | | |
116
-
|**Searching**| size_t **find_first**(string_view sv, string_view what) | position of first occurrence of given string, or npos [Note 1](#note-1)|
117
-
| | size_t **find_first_of**(string_view sv, string_view set) | position of first occurrence of character in set, or npos |
118
-
| | size_t **find_first_not_of**(string_view sv, string_view set) | position of first occurrence of character not in set, or npos |
119
-
| | size_t **find_last**(string_view sv, string_view what) | position of last occurrence of given string, or npos |
120
-
| | size_t **find_last_of**(string_view sv, string_view set) | position of last occurrence of character in set, or npos |
121
-
| | size_t **find_last_not_of**(string_view sv, string_view set) | position of last occurrence of character not in set, or npos |
122
-
| | | |
123
-
|**Modifiers**| char_t **to_lowercase**(char_t chr) | character transformed to lowercase |
124
-
| | char_t **to_uppercase**(char_t chr) | character transformed to uppercase |
125
-
| | string **to_lowercase**(string_view sv) | string transformed to lowercase |
126
-
| | string **to_uppercase**(string_view sv) | string transformed to uppercase |
127
-
| | string **substring**(string_view sv, size_t pos \[, size_t count\]); | substring starting at given position of given length, default up to end |
128
-
| | string **strip**(string_view sv, string_view set) | string with characters given in set stripped from left and right |
129
-
| | string **strip_left**(string_view sv, string_view set) | string with characters given in set stripped from left |
130
-
| | string **strip_right**(string_view sv, string_view set) | string with characters given in set stripped from right |
131
-
| | string **replace_all**(string_view sv, string_view what, string_view with) | string with all occurrences of 'what' replaced with 'with' |
132
-
| | string **replace_first**(string_view sv, string_view what, string_view with) | string with first occurrence of 'what' replaced with 'with' |
133
-
| | string **replace_last**(string_view sv, string_view what, string_view with) | string with last occurrence of 'what' replaced with 'with' |
134
-
| | | |
95
+
The following table presents types, values and simplified, short prototypes of the functions in _string-bare_'s `nonstd` namespace.
| |**char_delimiter**| character position, `char_delimiter('&')`|
105
+
| | | |
106
+
|**Value**| size_t **string::npos**| not-found position value, in nonstd::string namespace |
107
+
| | | |
108
+
|**Observers**| size_t **length**(string_view sv) | length of string |
109
+
| | size_t **size**(string_view sv) | length of string |
110
+
| | bool **is_empty**(string_view sv) | true if string is empty |
111
+
| | bool **contains**(string_view sv, string_view what) | true if string contains given string |
112
+
| | bool **starts_with**(string_view sv, string_view what) | true if string starts with given string |
113
+
| | bool **ends_with**(string_view sv, string_view what) | true if string ends with given string |
114
+
| | | |
115
+
|**Searching**| size_t **find_first**(string_view sv, string_view what) | position of first occurrence of given string, or npos |
116
+
| | size_t **find_first_of**(string_view sv, string_view set) | position of first occurrence of character in set, or npos |
117
+
| | size_t **find_first_not_of**(string_view sv, string_view set) | position of first occurrence of character not in set, or npos |
118
+
| | size_t **find_last**(string_view sv, string_view what) | position of last occurrence of given string, or npos |
119
+
| | size_t **find_last_of**(string_view sv, string_view set) | position of last occurrence of character in set, or npos |
120
+
| | size_t **find_last_not_of**(string_view sv, string_view set) | position of last occurrence of character not in set, or npos |
121
+
| | | |
122
+
|**Modifiers**| char_t **to_lowercase**(char_t chr) | character transformed to lowercase |
123
+
| | char_t **to_uppercase**(char_t chr) | character transformed to uppercase |
124
+
| | string **to_lowercase**(string_view sv) | string transformed to lowercase |
125
+
| | string **to_uppercase**(string_view sv) | string transformed to uppercase |
126
+
| | string **substring**(string_view sv, size_t pos \[, size_t count\]); | substring starting at given position of given length, default up to end |
127
+
| | string **strip**(string_view sv, string_view set) | string with characters given in set stripped from left and right |
128
+
| | string **strip_left**(string_view sv, string_view set) | string with characters given in set stripped from left |
129
+
| | string **strip_right**(string_view sv, string_view set) | string with characters given in set stripped from right |
130
+
| | string **replace_all**(string_view sv, string_view what, string_view with) | string with all occurrences of 'what' replaced with 'with' |
131
+
| | string **replace_first**(string_view sv, string_view what, string_view with) | string with first occurrence of 'what' replaced with 'with' |
132
+
| | string **replace_last**(string_view sv, string_view what, string_view with) | string with last occurrence of 'what' replaced with 'with' |
133
+
| | | |
135
134
|**Combining**| string **append**(string_view head, string_view tail) | string with tail appended to head |
136
-
| | string **join**(collection\<string_view\> vec, string_view sep) | string with elements of collection joined with given separator string |
137
-
| | vector\<string_view\>**split**(string_view sv, string_view set) | vector of string_view with elements of string separated by characters from given set |
135
+
| | string **join**(collection\<string_view\> vec, string_view sep) | string with elements of collection joined with given separator string |
136
+
| | vector\<string_view\>**split**(string_view sv, string_view set) | vector of string_view with elements of string separated by characters from given set |
138
137
| | tuple\<string_view, string_view\>**split_left**(string_view sv, Delimiter delim) | tuple with head and tail string_view on given string as split at left by given delimiter |
139
138
| | tuple\<string_view, string_view\>**split_right**(string_view sv, Delimiter delim) | tuple with head and tail string_view on given string as split at right by given delimiter |
140
139
| | tuple\<string_view, string_view\>**split_left**(string_view sv, string_view set) | tuple with head and tail string_view on given string as split at left by characters in given set |
141
140
| | tuple\<string_view, string_view\>**split_right**(string_view sv, string_view set) | tuple with head and tail string_view on given string as split at right by characters in given set |
142
141
143
-
<aid="note-1"></a>Note 1: npos: `nonstd::string::std17::string_view::npos`; TODO: provide `nonstd::string::npos`.
0 commit comments