26#ifndef GUL17_SUBSTRING_CHECKS_H_
27#define GUL17_SUBSTRING_CHECKS_H_
91 const auto hsl =
str.length();
110 return !
str.empty() &&
str.back() ==
c;
127 const auto hsl =
str.length();
130 return hsl >=
hl && std::string_view{
str.data(),
hl }.compare(
prefix) == 0;
146 return !
str.empty() &&
str.front() ==
c;
223 if (
j == std::size_t(-1)) {
278 str.remove_suffix(1);
324 str.remove_prefix(1);
Declarations of lowercase_ascii(), lowercase_ascii_inplace(), uppercase_ascii(), and uppercase_ascii_...
auto constexpr bit_set(unsigned bit) noexcept -> ReturnT
Set a bit in an integral type.
Definition bit_manip.h:124
constexpr char lowercase_ascii(char c) noexcept
Return the ASCII lowercase equivalent of the given character (or the unchanged character,...
Definition case_ascii.h:51
constexpr bool ends_with(std::string_view str, std::string_view suffix) noexcept
Determine whether a string ends with another string.
Definition substring_checks.h:89
constexpr bool contains_nocase(std::string_view haystack, std::string_view needle) noexcept
Determine whether a string contains another string.
Definition substring_checks.h:211
constexpr bool starts_with(std::string_view str, std::string_view prefix) noexcept
Determine whether a string starts with another string.
Definition substring_checks.h:125
constexpr bool 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 cas...
Definition substring_checks.h:169
constexpr bool ends_with_nocase(std::string_view str, std::string_view suffix) noexcept
Determine whether a string ends with another string.
Definition substring_checks.h:271
constexpr bool starts_with_nocase(std::string_view str, std::string_view prefix) noexcept
Determine whether a string starts with another string.
Definition substring_checks.h:317
constexpr bool contains(std::string_view haystack, std::string_view needle) noexcept
Determine whether a string contains another string.
Definition substring_checks.h:55
Definition of macros used internally by GUL.
Namespace gul17 contains all functions and classes of the General Utility Library.
Definition doxygen.h:29