23#ifndef GUL17_SUBSTRING_CHECKS_H_
24#define GUL17_SUBSTRING_CHECKS_H_
88 const auto hsl =
str.length();
107 return !
str.empty() &&
str.back() ==
c;
124 const auto hsl =
str.length();
127 return hsl >=
hl && std::string_view{
str.data(),
hl }.compare(
prefix) == 0;
143 return !
str.empty() &&
str.front() ==
c;
220 if (
j == std::size_t(-1)) {
275 str.remove_suffix(1);
321 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:121
constexpr char lowercase_ascii(char c) noexcept
Return the ASCII lowercase equivalent of the given character (or the unchanged character,...
Definition case_ascii.h:48
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:86
constexpr bool contains_nocase(std::string_view haystack, std::string_view needle) noexcept
Determine whether a string contains another string.
Definition substring_checks.h:208
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:122
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:166
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:268
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:314
constexpr bool contains(std::string_view haystack, std::string_view needle) noexcept
Determine whether a string contains another string.
Definition substring_checks.h:52
Definition of macros used internally by GUL.
Namespace gul17 contains all functions and classes of the General Utility Library.
Definition doxygen.h:26