C++ counterparts of SPL native functions that deal with string operations. More...


Detailed Description

C++ counterparts of SPL native functions that deal with string operations.


Function Documentation

Get the length of a string (the number of raw bytes).

Parameters:
Returns:
Length of the input string.

Get the length of a string (the number of raw bytes).

Parameters:
Returns:
Length of the input string.

Get the length of a string (the number of logical characters).

Parameters:
Returns:
Length of the input string.

Convert a string to lowercase.

Parameters:
Returns:
Input string in lowercase.
template<int32_t msize>

Convert a string to lowercase.

Parameters:
Returns:
Input string in lowercase.

Convert a string to lowercase.

Parameters:
Returns:
Input string in lowercase.

Convert a string to uppercase.

Parameters:
Returns:
Input string in uppercase.
template<int32_t msize>

Convert a string to uppercase.

Parameters:
Returns:
Input string in uppercase.

Convert a string to uppercase.

Parameters:
Returns:
Input string in uppercase.

Remove the leading and trailing characters from a string.

Parameters:
Returns:
Input string with leading and trailing characters in t removed.
template<int32_t msize>

Remove the leading and trailing characters from a string.

Parameters:
Returns:
Input string with leading and trailing characters in t removed.

Remove the leading characters from a string.

Parameters:
Returns:
Input string with leading characters in t removed.
template<int32_t msize>

Remove the leading characters from a string.

Parameters:
Returns:
Input string with leading characters in t removed.

Remove the leading characters from a string.

Parameters:
Returns:
Input string with leading characters in t removed.

Remove the trailing characters from a string.

Parameters:
Returns:
Input string with trailing characters in t removed.

Remove the trailing characters from a string.

Parameters:
Returns:
Input string with trailing characters in t removed.
template<int32_t msize>

Remove the trailing characters from a string.

Parameters:
Returns:
Input string with trailing characters in t removed.

Get a substring from a string.

Parameters:
Returns:
Substring of the input string.
template<int32_t msize>

Get a substring from a string.

Parameters:
Returns:
Substring of the input string.

Get a substring from a string.

Parameters:
Returns:
Substring of the input string.

Find a substring in a string.

Parameters:
Returns:
Index of the first match, -1 if no match.

Find a substring in a string.

Parameters:
Returns:
Index of the first match, -1 if no match.

Find a substring in a string.

Parameters:
Returns:
Index of the first match, -1 if no match.

Find a substring in a string.

Parameters:
Returns:
Index of the last match, -1 if no match.

Find a substring in a string.

Parameters:
Returns:
Index of the last match, -1 if no match.

Find a substring in a string.

Parameters:
Returns:
Index of the last match, -1 if no match.

Find a matching character in a string.

Parameters:
Returns:
Index of the first match, -1 if no match, where 0 is the first logical character in the input string.

Find a matching character in a string.

Parameters:
Returns:
Index of the first match, -1 if no match.

Find a matching character in a string.

Parameters:
Returns:
Index of the first match, -1 if no match.

Find a matching character in a string.

Parameters:
Returns:
Index of the last match, -1 if no match.

Find a matching character in a string.

Parameters:
Returns:
Index of the last match, -1 if no match.

Find a matching character in a string.

Parameters:
Returns:
Index of the last match, -1 if no match.

Find a non-matching character in a string.

Parameters:
Returns:
Index of the first non-match, -1 if all match.

Find a non-matching character in a string.

Parameters:
Returns:
Index of the first non-match, -1 if all match.

Find a non-matching character in a string.

Parameters:
Returns:
Index of the first non-match, -1 if all match.

Find the last non-matching character in a string.

Parameters:
Returns:
Index of the last non-match, -1 if all match.

Find the last non-matching character in a string.

Parameters:
Returns:
Index of the last non-match, -1 if all match.

Find the last non-matching character in a string.

Parameters:
Returns:
Index of the last non-match, -1 if all match.

Tokenize a string.

Parameters:
Returns:
A list of the tokens in the string.

Tokenize a string.

Parameters:
Returns:
A list of the tokens in the string.

Tokenize a string.

Parameters:

Tokenize a string.

Parameters:

Tokenize a string containing comma-separated values.

Parameters:
Returns:
A list of the tokens in the string, where the returned tokens are string literals (use interpretRStringLiteral() or interpretUStringLiteral() to interpret them).

Tokenize a string containing comma-separated values.

Parameters:
Returns:
A list of the tokens in the string, where the returned tokens are string literals (use interpretRStringLiteral() or interpretUStringLiteral() to interpret them).

Interpret a string literal stored in a UTF-8 encoded string as an rstring.

Parameters:
Returns:
Interpreted string, with escaped characters replaced with their raw values.
Exceptions:

Make a string literal from an rstring.

Parameters:
Returns:
A string literal, enclosed in double quotes, with non-ascii characters escaped, stored as a UTF-8 encoded string.

Interpret a string literal stored in a UTF-8 encoded string as a ustring.

Parameters:
Returns:
Interpreted string, with escaped characters replaced with their raw values.
Exceptions:

Make a string literal from a ustring.

Parameters:
Returns:
A string literal, enclosed in double quotes, with non-ascii characters escaped, stored as a UTF-8 encoded string.

Match a string with a regular expression, using POSIX Extended Regular Expressions (ERE), including sub-expression (capture group) matching using parentheses "()".

Note:
ERE matching is used by "grep -E", and has less functionality than Perl regular expressions. This function is currently implemented using the system C++ library for rstring and the ICU library for ustring.
Parameters:
Returns:
List of matches, consisting of the whole matched string, if any, followed by any sub-expression matches, in order.
Exceptions:

Match a string with a regular expression, using POSIX Extended Regular Expressions (ERE), including sub-expression (capture group) matching using parentheses "()".

Note:
ERE matching is used by "grep -E", and has less functionality than Perl regular expressions. This function is currently implemented using the system C++ library for rstring and the ICU library for ustring.
Parameters:
Returns:
List of matches, consisting of the whole matched string, if any, followed by any sub-expression matches, in order.
Exceptions:

Match and replace a string with a regular expression, using POSIX Extended Regular Expressions (ERE), including sub-expression (capture group) matching using parentheses "()".

Note:
ERE matching is used by "grep -E", and has less functionality than Perl regular expressions. Match and replace is similar to using "sed". This function is currently implemented using the system C++ library for rstring and the ICU library for ustring.
Parameters:
Returns:
Resulting string with replacements.
Exceptions:

Match and replace a string with a regular expression, using POSIX Extended Regular Expressions (ERE), including sub-expression (capture group) matching using parentheses "()".

Note:
ERE matching is used by "grep -E", and has less functionality than Perl regular expressions. Match and replace is similar to using "sed". This function is currently implemented using the system C++ library for rstring and the ICU library for ustring.
Parameters:
Returns:
Resulting string with replacements.
Exceptions:

Match a string with a regular expression, using a Perl regular expression, including sub-expression (capture group) matching using parentheses "()".

Note:
Perl regular expression matching is used by "grep -P", and has more functionality than POSIX Extended Regular Expressions. This function is currently implemented using the Boost C++ library.
Parameters:
Returns:
List of matches, consisting of the whole matched string, if any, followed by any sub-expression matches, in order.
Exceptions:

Match a string with a regular expression, using a Perl regular expression, including sub-expression (capture group) matching using parentheses "()".

Note:
Perl regular expression matching is used by "grep -P", and has more functionality than POSIX Extended Regular Expressions. This function is currently implemented using the Boost C++ library.
Parameters:
Returns:
List of matches, consisting of the whole matched string, if any, followed by any sub-expression matches, in order.
Exceptions:

Match and replace a string with a regular expression, using a Perl regular expression, including sub-expression (capture group) matching using parentheses "()".

Note:
Perl regular expression matching is used by "grep -P", and has more functionality than POSIX Extended Regular Expressions. Match and replace is similar to using "sed". This function is currently implemented using the Boost C++ library.
Parameters:
Returns:
Resulting string with replacements.
Exceptions:

Match and replace a string with a regular expression, using a Perl regular expression, including sub-expression (capture group) matching using parentheses "()".

Note:
Perl regular expression matching is used by "grep -P", and has more functionality than POSIX Extended Regular Expressions. Match and replace is similar to using "sed". This function is currently implemented using the Boost C++ library.
Parameters:
Returns:
Resulting string with replacements.
Exceptions:

Convert data given as raw bytes with a specified encoding into a UTF-8 encoded string.

Parameters:
Returns:
The UTF-8 encoded string representation.
template<int32_t N>

Convert data given as raw bytes with a specified encoding into a UTF-8 encoded string.

Parameters:
Returns:
The UTF-8 encoded string representation.

Convert data given as raw bytes with a specified encoding into a UTF-8 encoded string.

Parameters:
Returns:
The UTF-8 encoded string representation.

Convert a UTF-8 encoded string into data as raw bytes with a specified encoding.

Parameters:
Returns:
Data as raw bytes with the specified encoding.

Convert a UTF-8 encoded string into a string with a specified encoding.

Parameters:
Returns:
Data as an rstring with the specified encoding.

Convert the first character of a string to its corresponding ASCII code.

Parameters:
Returns:
ASCII code of the first character of the string.

Convert the first character of a string to its corresponding ASCII code.

Parameters:
Returns:
ASCII code of the first character of the string.

Convert the first character of a string to its corresponding Unicode code point.

Parameters:
Returns:
Unicode code point of the first character of the string.
template<class T >

Convert any SPL type to to a serialized string. For example, strings are quoted, and characters escaped.

Parameters:
Returns:
Serialized string form of v.
Exceptions:
template<class T , int32_t size>

Convert any SPL type to to a serialized string. For example, strings are quoted, and characters escaped.

Parameters:
Returns:
Serialized string form of v.
Exceptions:

Return a slice from a string [lower..upper-1].

Parameters:
Returns:
The slice s[lower..upper-1].
Exceptions:

Return a slice from a string [0..upper-1].

Parameters:
Returns:
The slice s[0..upper-1].

Return a slice from a string [lower..<end of string>].

Parameters:
Returns:
The slice s[lower..<end of string>].
Exceptions:
template<int32_t msize>

Return a slice from a bounded string [lower..upper-1].

Parameters:
Returns:
The slice s[lower..upper-1].
Exceptions:
template<int32_t msize>

Return a slice from a bounded string [0..upper-1].

Parameters:
Returns:
The slice s[0..upper-1].
template<int32_t msize>

Return a slice from a bounded string [lower..<end of string>].

Parameters:
Returns:
The slice s[lower..<end of string>].
Exceptions:

Return a slice from a string [lower..upper-1].

Parameters:
Returns:
The slice s[lower..upper-1].
Exceptions:

Return a slice from a string [0..upper-1].

Parameters:
Returns:
The slice s[0..upper-1].

Return a slice from a string [lower..<end of string>].

Parameters:
Returns:
The slice s[lower..<end of string>].
Exceptions:
template<int32_t msize, int msize2>

Concatenate two bounded rstring strings, returning an rstring.

Parameters:
Returns:
The concatenation of lstr to rstr.
template<int32_t msize>

Concatenate an rstring with a bounded rstring, returning an rstring.

Parameters:
Returns:
The concatenation of lstr to rstr.
template<int32_t msize>

Concatenate a bounded rstring with an rstring, returning an rstring.

Parameters:
Returns:
The concatenation of lstr to rstr.

Concatenate two rstring strings, returning an rstring.

Parameters:
Returns:
The concatenation of lstr to rstr.
template<int32_t msize, int msize2>

Append a bounded rstring to a bounded rstring.

Parameters:
template<int32_t msize>

Append an rstring to a bounded rstring.

Parameters:

Convert a blob to an rstring.

Parameters:
Returns:
An rstring with the characters from the blob.

Convert an rstring to a blob.

Parameters:
Returns:
A blob with the characters from the rstring.