![]() |
General Utility Library for C++17 25.7.0
|
Checking whether a string contains, ends with, or starts with another string.
Functions | |
| constexpr bool | gul17::contains (std::string_view haystack, std::string_view needle) noexcept |
| Determine whether a string contains another string. | |
| constexpr bool | gul17::contains (std::string_view haystack, char needle) noexcept |
| Determine whether a string contains a certain character. | |
| constexpr bool | gul17::ends_with (std::string_view str, std::string_view suffix) noexcept |
| Determine whether a string ends with another string. | |
| constexpr bool | gul17::ends_with (std::string_view str, char c) noexcept |
| Determine whether a string ends with a certain character. | |
| constexpr bool | gul17::starts_with (std::string_view str, std::string_view prefix) noexcept |
| Determine whether a string starts with another string. | |
| constexpr bool | gul17::starts_with (std::string_view str, char c) noexcept |
| Determine whether a string starts with a certain character. | |
| constexpr bool | gul17::equals_nocase (std::string_view str1, std::string_view str2) noexcept |
| Determine whether a string is equal to another one, making no distinction between upper and lower case ASCII characters. | |
| constexpr bool | gul17::contains_nocase (std::string_view haystack, std::string_view needle) noexcept |
| Determine whether a string contains another string. | |
| constexpr bool | gul17::contains_nocase (std::string_view haystack, char needle) noexcept |
| Determine whether a string contains a certain character. | |
| constexpr bool | gul17::ends_with_nocase (std::string_view str, std::string_view suffix) noexcept |
| Determine whether a string ends with another string. | |
| constexpr bool | gul17::ends_with_nocase (std::string_view str, char c) noexcept |
| Determine whether a string ends with a certain character. | |
| constexpr bool | gul17::starts_with_nocase (std::string_view str, std::string_view prefix) noexcept |
| Determine whether a string starts with another string. | |
| constexpr bool | gul17::starts_with_nocase (std::string_view str, char c) noexcept |
| Determine whether a string starts with a certain character. | |
Determine whether a string contains a certain character.
The comparison is case sensitive.
| haystack | The string in which to search. |
| needle | The character that should be searched for. |
haystack contains at least one occurrence of needle, false otherwise.References gul17::bit_set().
|
inlineconstexprnoexcept |
Determine whether a string contains another string.
The comparison is case sensitive. If the searched-for string is empty, the result is true.
| haystack | The string in which to search. |
| needle | The string that should be searched for. |
haystack contains at least one occurrence of needle, false otherwise.References gul17::bit_set().
|
inlineconstexprnoexcept |
Determine whether a string contains a certain character.
The comparison is case insensitive as far as ASCII characters are concerned (C locale).
| haystack | The string in which to search. |
| needle | The character that should be searched for. |
haystack contains at least one occurrence of needle, false otherwise.References gul17::bit_set(), and gul17::lowercase_ascii().
|
inlineconstexprnoexcept |
Determine whether a string contains another string.
The comparison is case insensitive as far as ASCII characters are concerned (C locale). If the searched-for string is empty, the result is true.
| haystack | The string in which to search. |
| needle | The string that should be searched for. |
haystack contains at least one occurrence of needle, false otherwise.References gul17::bit_set(), and gul17::lowercase_ascii().
Determine whether a string ends with a certain character.
The comparison is case sensitive.
| str | The string to be tested. |
| c | The character to be looked for at the end of str. |
str ends with c, false otherwise.References gul17::bit_set().
|
inlineconstexprnoexcept |
Determine whether a string ends with another string.
The comparison is case sensitive. If the searched-for suffix is empty, the result is true.
| str | The full string to be tested. |
| suffix | The suffix to be looked for at the end of str. |
str ends with suffix, false otherwise.References gul17::bit_set().
Determine whether a string ends with a certain character.
The comparison is case insensitive as far as ASCII characters are concerned (C locale).
| str | The string to be tested. |
| c | The character to be looked for at the end of str. |
str ends with c, false otherwise.References gul17::bit_set(), and gul17::lowercase_ascii().
|
inlineconstexprnoexcept |
Determine whether a string ends with another string.
The comparison is case insensitive as far as ASCII characters are concerned (C locale). If the searched-for suffix is empty, the result is true.
| str | The full string to be tested. |
| suffix | The suffix to be looked for at the end of str. |
str ends with suffix, false otherwise.References gul17::bit_set(), and gul17::lowercase_ascii().
|
inlineconstexprnoexcept |
Determine whether a string is equal to another one, making no distinction between upper and lower case ASCII characters.
In other terms, this function performs a case insensitive string comparison using the C locale.
| str1,str2 | The two strings that should be compared. |
str1 and str2 are equal, or false otherwise.References gul17::bit_set(), and gul17::lowercase_ascii().
Determine whether a string starts with a certain character.
The comparison is case sensitive.
| str | The string to be tested. |
| c | The character to be looked for at the beginning of str. |
str starts with c, false otherwise.References gul17::bit_set().
|
inlineconstexprnoexcept |
Determine whether a string starts with another string.
The comparison is case sensitive. If the searched-for prefix is empty, the result is true.
| str | The full string to be tested. |
| prefix | The prefix to be looked for at the beginning of str. |
str starts with prefix, false otherwise.References gul17::bit_set().
Determine whether a string starts with a certain character.
The comparison is case insensitive as far as ASCII characters are concerned (C locale).
| str | The string to be tested. |
| c | The character to be looked for at the beginning of str. |
str starts with c, false otherwise.References gul17::bit_set(), and gul17::lowercase_ascii().
|
inlineconstexprnoexcept |
Determine whether a string starts with another string.
The comparison is case insensitive as far as ASCII characters are concerned (C locale). If the searched-for prefix is empty, the result is true.
| str | The full string to be tested. |
| prefix | The prefix to be looked for at the beginning of str. |
str starts with prefix, false otherwise.References gul17::bit_set(), and gul17::lowercase_ascii().