|
static void | append (std::string &str, char c, size_t count) |
| Appends count times the supplied ascii character to the supplied UTF-8 string (in place version). More...
|
|
static void | append (std::string &str, char32_t c, size_t count) |
| Appends count times the supplied code point to the supplied UTF-8 string (in place version). More...
|
|
static void | append (std::u32string &str, char32_t c, size_t count) |
| Appends count times the supplied code point to the supplied UTF-32 string (in place version). More...
|
|
static std::string | append (const std::string_view &str, char c, size_t count) |
| Returns the supplied UTF-8 string with count times the supplied ascii character appended to it. More...
|
|
static std::string | append (const std::string &str, char32_t c, size_t count) |
| Returns the supplied UTF-8 string with count times the supplied code point appended to it. More...
|
|
static std::u32string | append (const std::u32string &str, char32_t c, size_t count) |
| Returns the supplied UTF-32 string with count times the supplied code point appended to it. More...
|
|
static size_t | codePointCount (const std::string_view &str) |
| Count the number of code points in the supplied UTF-8 string. More...
|
|
static size_t | codePointCount (const std::u32string_view &str) |
| Count the number of code points in the supplied UTF-32 string. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT, typename SubstrT > |
static bool | contains (const StringT< CharT, T ... > &str, const SubstrT &substring) |
| Does the first string contain the second string? More...
|
|
template<typename CharT , typename SubstrT > |
static bool | contains (const CharT *str, const SubstrT &substring) |
| Does the first string contain the second string? More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT> |
static bool | contains (const StringT< CharT, T ... > &str, const CharT &c) |
| Does the string contain the ascii char (UTF-8) / UTF-16 char (UTF-16) / code point (UTF-32)? More...
|
|
template<typename CharT > |
static bool | contains (const CharT *str, const CharT &c) |
| Does the string contain the ascii char (UTF-8) / UTF-16 char (UTF-16) / code point (UTF-32)? More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT, typename SuffixT > |
static bool | endsWith (const StringT< CharT, T ... > &str, const SuffixT &suffix) |
| Does the string end with the specified suffix? More...
|
|
template<typename CharT , typename SuffixT > |
static bool | endsWith (const CharT *str, const SuffixT &suffix) |
| Does the string end with the specified suffix? More...
|
|
template<typename CharT > |
static bool | endsWith (const std::basic_string_view< CharT > &str, const std::basic_string_view< CharT > &suffix) |
| Does the first string end with the specified suffix? More...
|
|
static bool | endsWith (const char *str, const char suffix) |
| Does the UTF-8 string end with the specified ascii char? More...
|
|
static bool | endsWith (const std::string_view &str, const char suffix) |
| Does the UTF-8 string end with the specified ascii char? More...
|
|
static bool | endsWith (const char32_t *str, const char32_t suffix) |
| Does the UTF-32 string end with the specified ascii char? More...
|
|
static bool | endsWith (const std::u32string_view &str, const char32_t suffix) |
| Does the UTF-32 string end with the specified code point? More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT, typename SubstrT > |
static bool | equalsIgnoreCase (const StringT< CharT, T ... > &lhs, const SubstrT &rhs) |
| Ignoring case, is the first string equal to the second string? More...
|
|
template<typename CharT , typename SubstrT > |
static bool | equalsIgnoreCase (const CharT *lhs, const SubstrT &rhs) |
| Ignoring case, is the first string equal to the second string? More...
|
|
template<typename AllocatorT , typename CharT , typename ... T, template< typename ... > class StringT, typename P1 , typename ... P> |
static std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > | join (StringT< CharT, T ... > delimiter, const P1 &p1, const P &... p) |
| Call to-string on each of the objects and join the resulting strings together with the delimiter. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT, typename P1 , typename ... P> |
static std::basic_string< CharT > | join (StringT< CharT, T ... > delimiter, const P1 &p1, const P &... p) |
| Call to-string on each of the objects and join the resulting strings together with the delimiter. More...
|
|
template<typename AllocatorT , typename CharT , typename P1 , typename ... P> |
static std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > | join (const CharT *delimiter, const P1 &p1, const P &... p) |
| Call to-string on each of the objects and join the resulting strings together with the delimiter. More...
|
|
template<typename CharT , typename P1 , typename ... P> |
static std::basic_string< CharT > | join (const CharT *delimiter, const P1 &p1, const P &... p) |
| Call to-string on each of the objects and join the resulting strings together with the delimiter. More...
|
|
template<typename AllocatorT , typename CharT , typename ... T, template< typename ... > class C> |
static std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > | joinContainer (const CharT *delimiter, const C< T ... > &container) |
| Call to-string on each of the objects in the container and join the resulting strings together with the delimiter. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class C> |
static std::basic_string< CharT > | joinContainer (const CharT *delimiter, const C< T ... > &container) |
| Call to-string on each of the objects in the container and join the resulting strings together with the delimiter. More...
|
|
template<typename AllocatorT , typename CharT , typename ... T, template< typename ... > class C> |
static std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > | joinContainer (const std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > &delimiter, const C< T ... > &container) |
| Call to-string on each of the objects in the container and join the resulting strings together with the delimiter. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class C> |
static std::basic_string< CharT > | joinContainer (const std::basic_string< CharT > &delimiter, const C< T ... > &container) |
| Call to-string on each of the objects in the container and join the resulting strings together with the delimiter. More...
|
|
template<typename AllocatorT , typename CharT , typename ... T, template< typename ... > class C> |
static std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > | joinContainer (std::basic_string_view< CharT > delimiter, const C< T ... > &container) |
| Call to-string on each of the objects in the container and join the resulting strings together with the delimiter. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class C> |
static std::basic_string< CharT > | joinContainer (std::basic_string_view< CharT > delimiter, const C< T ... > &container) |
| Call to-string on each of the objects in the container and join the resulting strings together with the delimiter. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT, typename SubstrT > |
static size_t | lastIndexOf (const StringT< CharT, T ... > &str, const SubstrT &substring) |
| Get the character (UTF-8) / code point (UTF-32) position of the last index of the specified sub-string. More...
|
|
template<typename CharT , typename SubstrT > |
static size_t | lastIndexOf (const CharT *str, const SubstrT &substring) |
| Get the character (UTF-8) / code point (UTF-32) position of the last index of the specified sub-string. More...
|
|
template<typename ... T, template< typename ... > class StringT> |
static std::vector< size_t > | lineLengths (const StringT< char, T ... > &text, const std::regex &lineBreakRegex, bool includeExtraTextAsLine=true) |
| Determine the lengths of the lines in bytes, given the line break regular expression. More...
|
|
template<typename ... T, template< typename ... > class StringT> |
static std::vector< size_t > | lineLengths (const StringT< char, T ... > &text, bool includeExtraTextAsLine=true) |
| Given the supplied multi-line text string, determine the length of each line in bytes. More...
|
|
static std::vector< size_t > | lineLengths (const char *text, bool includeExtraTextAsLine=true) |
| Given the supplied multi-line text string, determine the length of each line in bytes. More...
|
|
static bool | matches (const std::string &str, const std::regex &re) |
| Does the string match the specified regular expression? More...
|
|
template<typename CharT , typename SubstrT > |
static size_t | occurrences (const CharT *str, const SubstrT &substring) |
| How many non-overlapping occurrences of the second string are found in the first string? More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT, typename SubstrT > |
static size_t | occurrences (const StringT< CharT, T ... > &str, const SubstrT &substring) |
| How many non-overlapping occurrences of the second string are found in the first string? More...
|
|
static size_t | occurrences (const std::string &str, const std::regex ®ex) |
| Count the number of non-overlapping occurrences of the supplied regular expression. More...
|
|
static size_t | occurrences (const char *str, const std::regex ®ex) |
| Count the number of non-overlapping occurrences of the supplied regular expression. More...
|
|
static size_t | occurrences (const std::string_view &str, const std::regex ®ex) |
| Count the number of non-overlapping occurrences of the supplied regular expression. More...
|
|
static std::string | padLeft (const std::string_view &str, unsigned int width, char c=' ') |
| Left pad the supplied UTF-8 string up to the specified width in code points. More...
|
|
static std::string | padLeft (const std::string_view &str, unsigned int width, char32_t c) |
| Left pad the supplied UTF-8 string up to the specified width in code points. More...
|
|
static std::u32string | padLeft (const std::u32string_view &str, unsigned int width, char32_t c=U' ') |
| Left pad the supplied UTF-32 string up to the specified width in code points. More...
|
|
static std::string | padRight (const std::string_view &str, unsigned int width, char c=' ') |
| Right pad the supplied UTF-8 string up to the specified width in code points. More...
|
|
static std::string | padRight (const std::string_view &str, unsigned int width, char32_t c) |
| Right pad the supplied UTF-8 string up to the specified width in code points. More...
|
|
static std::u32string | padRight (const std::u32string_view &str, unsigned int width, char32_t c=U' ') |
| Right pad the supplied UTF-32 string up to the specified width in code points. More...
|
|
template<typename AllocatorT , typename CharT , typename ... T, template< typename ... > class C, typename ... U, template< typename ... > class PrefixT, typename ... V, template< typename ... > class SuffixT> |
static std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > | prefixSuffixJoin (const C< T ... > &container, const PrefixT< CharT, U ... > &prefix, const SuffixT< CharT, V ... > &suffix) |
| Call to-string on each of the objects in the container and join the resulting strings together with the prefix and suffix. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class C, typename ... U, template< typename ... > class PrefixT, typename ... V, template< typename ... > class SuffixT> |
static std::string | prefixSuffixJoin (const C< T ... > &container, const PrefixT< CharT, U ... > &prefix, const SuffixT< CharT, V ... > &suffix) |
| Call to-string on each of the objects in the container and join the resulting strings together with the prefix and suffix. More...
|
|
template<typename AllocatorT , typename CharT , typename ... T, template< typename ... > class C> |
static std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > | prefixSuffixJoin (const C< T ... > &container, const CharT *prefix, const CharT *suffix) |
| Call to-string on each of the objects in the container and join the resulting strings together with the prefix and suffix. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class C> |
static std::basic_string< CharT > | prefixSuffixJoin (const C< T ... > &container, const CharT *prefix, const CharT *suffix) |
| Call to-string on each of the objects in the container and join the resulting strings together with the prefix and suffix. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT, typename MatchT , typename ReplacementT > |
static std::basic_string< CharT > | replaceAll (const StringT< CharT, T ... > &input, const MatchT &match, const ReplacementT &replacement) |
| Replace all occurrences of the specified string with the supplied replacement. More...
|
|
template<typename CharT , typename AllocatorT , typename ... T, template< typename ... > class StringT, typename MatchT , typename ReplacementT > |
static std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > | replaceAll (const StringT< CharT, T ... > &input, const MatchT &match, const ReplacementT &replacement) |
| Replace all occurrences of the specified string with the supplied replacement (specified allocator version). More...
|
|
template<typename CharT , typename AllocatorT , typename MatchT , typename ReplacementT > |
static std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > | replaceAll (const CharT *input, const MatchT &match, const ReplacementT &replacement) |
| Replace all occurrences of the specified string with the supplied replacement. More...
|
|
template<typename CharT , typename AllocatorT > |
static std::basic_string< CharT, std::char_traits< CharT >, AllocatorT > | replaceAll (std::basic_string_view< CharT > input, std::basic_string_view< CharT > match, std::basic_string_view< CharT > replacement, size_t *count=nullptr) |
| Replace all occurrences of the specified string with the supplied replacement. More...
|
|
template<typename CharT > |
static std::basic_string< CharT > | replaceAll (std::basic_string_view< CharT > input, std::basic_string_view< CharT > match, std::basic_string_view< CharT > replacement, size_t *count=nullptr) |
| Replace all occurrences of the specified string with the supplied replacement. More...
|
|
static std::string | replaceAll (std::string_view input, std::string_view match, std::string_view replacement, size_t *count=nullptr) |
| Replace all occurrences of the specified string with the supplied replacement. More...
|
|
static std::u32string | replaceAll (std::u32string_view input, std::u32string_view match, std::u32string_view replacement, size_t *count=nullptr) |
| Replace all occurrences of the specified string with the supplied replacement. More...
|
|
template<typename ReplacementT > |
static std::string | replaceAll (const char *input, const std::regex ®ex, const ReplacementT &replacement) |
| Replace all occurrences of the regular expression in the input string with the replacement string. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT, typename ReplacementT > |
static std::string | replaceAll (const StringT< CharT, T ... > &input, const std::regex ®ex, const ReplacementT &replacement) |
| Replace all occurrences of the regular expression in the input string with the replacement string. More...
|
|
static std::string | simplify (const std::string_view &input) |
| Simplify whitespace (conflate blanks) from the supplied UTF-8 string. More...
|
|
static std::vector< std::string_view > | split (const std::string_view &input, const std::regex &delimiter, bool returnDelimiters=false, bool compress=true) |
| Split the input string on each of the occurrences of the specified delimiter regular expression. More...
|
|
static std::vector< std::string_view > | split (const std::string_view &input, const std::string_view &delimiter, bool compress=true) |
| Split the input string on each of the occurrences of the specified delimiter. More...
|
|
static std::vector< std::u32string_view > | split (const std::u32string_view &input, const std::u32string_view &delimiter, bool compress=true) |
| Split the input string on each of the occurrences of the specified delimiter. More...
|
|
static std::vector< std::string_view > | splitAndTrim (const std::string_view &input, const std::regex &delimiter, bool returnDelimiters=false, bool compress=true) |
| Split the input string on each of the occurrences of the specified delimiter regular expression and subsequently trim the resulting strings. More...
|
|
static std::vector< std::string_view > | splitAndTrim (const std::string_view &input, const std::string_view &delimiter, bool compress=true) |
| Split the input string on each of the occurrences of the specified delimiter and subsequently trim the resulting strings. More...
|
|
static std::vector< std::u32string_view > | splitAndTrim (const std::u32string_view &input, const std::u32string_view &delimiter, bool compress=true) |
| Split the input string on each of the occurrences of the specified delimiter and subsequently trim the resulting strings. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT, typename PrefixT > |
static bool | startsWith (const StringT< CharT, T ... > &str, const PrefixT &prefix) |
| Does the string start with the specified prefix? More...
|
|
template<typename CharT , typename ... T, template< typename ... > class StringT> |
static bool | startsWith (const StringT< CharT, T ... > &str, CharT prefix) |
| Does the string start with the specified prefix? More...
|
|
template<typename CharT , typename PrefixT > |
static bool | startsWith (const CharT *str, const PrefixT &prefix) |
| Does the string start with the specified prefix? More...
|
|
template<typename CharT > |
static bool | startsWith (const CharT *str, CharT prefix) |
| Does the string start with the specified prefix? More...
|
|
template<typename CharT > |
static bool | startsWith (const std::basic_string_view< CharT > &str, const std::basic_string_view< CharT > &prefix) |
| Does the string start with the specified prefix? More...
|
|
template<typename CharT > |
static bool | startsWith (const std::basic_string_view< CharT > &str, CharT prefix) |
| Does the string start with the specified prefix? More...
|
|
static bool | startsWithRegex (const std::string &str, const std::regex &prefix) |
| Does the string start with the specified regular expression? More...
|
|
static std::string | toLower (const std::string_view &s) |
| Convert the supplied UTF-8 string to lowercase. More...
|
|
static std::u32string | toLower (const std::u32string_view &s) |
| Convert the supplied UTF-32 string to lowercase. More...
|
|
template<typename CharT , typename ... T, template< typename ... > class ContainerT> |
static ContainerT< std::basic_string< CharT > > | toStringContainer (const ContainerT< std::basic_string_view< CharT >, T ... > &input) |
| Convert the container of string views to a container of strings. More...
|
|
static std::string | toUpper (const std::string_view &s) |
| Convert the supplied UTF-8 string to uppercase. More...
|
|
static std::u32string | toUpper (const std::u32string_view &s) |
| Convert the supplied UTF-32 string to uppercase. More...
|
|
static std::string_view | trim (const std::string_view &input) |
| Trim whitespace from the beginning and end of the supplied UTF-8 string. More...
|
|
static std::u32string_view | trim (const std::u32string_view &input) |
| Trim whitespace from the beginning and end of the supplied UTF-32 string. More...
|
|
static std::string_view | trimLeft (const std::string_view &input) |
| Trim whitespace from the beginning of the supplied UTF-8 string. More...
|
|
static std::u32string_view | trimLeft (const std::u32string_view &input) |
| Trim whitespace from the beginning of the supplied UTF-32 string. More...
|
|
static std::string_view | trimRight (const std::string_view &input) |
| Trim whitespace from the end of the supplied UTF-8 string. More...
|
|
static std::u32string_view | trimRight (const std::u32string_view &input) |
| Trim whitespace from the end of the supplied UTF-32 string. More...
|
|