|
constexpr char | wpi::hexdigit (unsigned X, bool LowerCase=false) noexcept |
| hexdigit - Return the hexadecimal character for the given number X (which should be less than 16).
|
|
constexpr unsigned | wpi::hexDigitValue (char C) noexcept |
| Interpret the given character C as a hexadecimal digit and return its value.
|
|
constexpr bool | wpi::isDigit (char C) noexcept |
| Checks if character C is one of the 10 decimal digits.
|
|
constexpr bool | wpi::isHexDigit (char C) noexcept |
| Checks if character C is a hexadecimal numeric character.
|
|
constexpr bool | wpi::isAlpha (char C) noexcept |
| Checks if character C is a valid letter as classified by "C" locale.
|
|
constexpr bool | wpi::isAlnum (char C) noexcept |
| Checks whether character C is either a decimal digit or an uppercase or lowercase letter as classified by "C" locale.
|
|
constexpr bool | wpi::isASCII (char C) noexcept |
| Checks whether character C is valid ASCII (high bit is zero).
|
|
constexpr bool | wpi::isPrint (char C) noexcept |
| Checks whether character C is printable.
|
|
constexpr char | wpi::toLower (char x) noexcept |
| Returns the corresponding lowercase character if x is uppercase.
|
|
constexpr char | wpi::toUpper (char x) noexcept |
| Returns the corresponding uppercase character if x is lowercase.
|
|
std::string | wpi::utohexstr (unsigned long long val, bool lowerCase=false) |
|
constexpr bool | wpi::equals (std::string_view lhs, std::string_view rhs) noexcept |
| equals - Check for string equality, this is more efficient than compare() when the relative ordering of inequal strings isn't needed.
|
|
int | wpi::compare_lower (std::string_view lhs, std::string_view rhs) noexcept |
| compare_lower - Compare two strings, ignoring case.
|
|
constexpr bool | wpi::equals_lower (std::string_view lhs, std::string_view rhs) noexcept |
| equals_lower - Check for string equality, ignoring case.
|
|
std::string_view::size_type | wpi::find_lower (std::string_view str, char ch, std::string_view::size_type from=0) noexcept |
| Search for the first character ch in str , ignoring case.
|
|
std::string_view::size_type | wpi::find_lower (std::string_view str, std::string_view other, std::string_view::size_type from=0) noexcept |
| Search for the first string other in str , ignoring case.
|
|
std::string_view::size_type | wpi::find_lower (std::string_view str, const char *other, std::string_view::size_type from=0) noexcept |
| Search for the first string other in str , ignoring case.
|
|
std::string_view::size_type | wpi::rfind_lower (std::string_view str, char ch, std::string_view::size_type from=std::string_view::npos) noexcept |
| Search for the last character ch in str , ignoring case.
|
|
std::string_view::size_type | wpi::rfind_lower (std::string_view str, std::string_view other) noexcept |
| Search for the last string other in str , ignoring case.
|
|
std::string_view::size_type | wpi::rfind_lower (std::string_view str, const char *other) noexcept |
| Search for the last string other in str , ignoring case.
|
|
constexpr std::string_view | wpi::substr (std::string_view str, std::string_view::size_type start, std::string_view::size_type n=std::string_view::npos) noexcept |
| Returns the substring of str from [start, start + n).
|
|
constexpr bool | wpi::starts_with (std::string_view str, std::string_view prefix) noexcept |
| Checks if str starts with the given prefix .
|
|
constexpr bool | wpi::starts_with (std::string_view str, char prefix) noexcept |
| Checks if str starts with the given prefix .
|
|
constexpr bool | wpi::starts_with (std::string_view str, const char *prefix) noexcept |
| Checks if str starts with the given prefix .
|
|
bool | wpi::starts_with_lower (std::string_view str, std::string_view prefix) noexcept |
| Checks if str starts with the given prefix , ignoring case.
|
|
constexpr bool | wpi::starts_with_lower (std::string_view str, char prefix) noexcept |
| Checks if str starts with the given prefix , ignoring case.
|
|
bool | wpi::starts_with_lower (std::string_view str, const char *prefix) noexcept |
| Checks if str starts with the given prefix , ignoring case.
|
|
constexpr bool | wpi::ends_with (std::string_view str, std::string_view suffix) noexcept |
| Checks if str ends with the given suffix .
|
|
constexpr bool | wpi::ends_with (std::string_view str, char suffix) noexcept |
| Checks if str ends with the given suffix .
|
|
constexpr bool | wpi::ends_with (std::string_view str, const char *suffix) noexcept |
| Checks if str ends with the given suffix .
|
|
bool | wpi::ends_with_lower (std::string_view str, std::string_view suffix) noexcept |
| Checks if str ends with the given suffix , ignoring case.
|
|
constexpr bool | wpi::ends_with_lower (std::string_view str, char suffix) noexcept |
| Checks if str ends with the given suffix , ignoring case.
|
|
bool | wpi::ends_with_lower (std::string_view str, const char *suffix) noexcept |
| Checks if str ends with the given suffix , ignoring case.
|
|
constexpr bool | wpi::contains (std::string_view str, std::string_view other) noexcept |
| Checks if str contains the substring other .
|
|
constexpr bool | wpi::contains (std::string_view str, char ch) noexcept |
| Checks if str contains the substring other .
|
|
constexpr bool | wpi::contains (std::string_view str, const char *other) noexcept |
| Checks if str contains the substring other .
|
|
bool | wpi::contains_lower (std::string_view str, std::string_view other) noexcept |
| Checks if str contains the substring other , ignoring case.
|
|
bool | wpi::contains_lower (std::string_view str, char ch) noexcept |
| Checks if str contains the substring other , ignoring case.
|
|
bool | wpi::contains_lower (std::string_view str, const char *other) noexcept |
| Checks if str contains the substring other , ignoring case.
|
|
constexpr std::optional< std::string_view > | wpi::remove_prefix (std::string_view str, std::string_view prefix) noexcept |
| Return an optional containing str but with prefix removed if the string starts with the prefix.
|
|
constexpr std::optional< std::string_view > | wpi::remove_suffix (std::string_view str, std::string_view suffix) noexcept |
| Return an optional containing str but with suffix removed if the string ends with the suffix.
|
|
constexpr std::string_view | wpi::drop_front (std::string_view str, std::string_view::size_type n=1) noexcept |
| Return a string_view equal to str but with the first n elements dropped.
|
|
constexpr std::string_view | wpi::drop_back (std::string_view str, std::string_view::size_type n=1) noexcept |
| Return a string_view equal to str but with the last n elements dropped.
|
|
constexpr std::string_view | wpi::take_front (std::string_view str, std::string_view::size_type n=1) noexcept |
| Returns a view equal to str but with only the first n elements remaining.
|
|
constexpr std::string_view | wpi::take_back (std::string_view str, std::string_view::size_type n=1) noexcept |
| Returns a view equal to str but with only the last n elements remaining.
|
|
constexpr std::string_view | wpi::slice (std::string_view str, std::string_view::size_type start, std::string_view::size_type end) noexcept |
| Returns a reference to the substring of str from [start, end).
|
|
constexpr std::pair< std::string_view, std::string_view > | wpi::split (std::string_view str, char separator) noexcept |
| Splits str into two substrings around the first occurrence of a separator character.
|
|
constexpr std::pair< std::string_view, std::string_view > | wpi::split (std::string_view str, std::string_view separator) noexcept |
| Splits str into two substrings around the first occurrence of a separator string.
|
|
constexpr std::pair< std::string_view, std::string_view > | wpi::rsplit (std::string_view str, char separator) noexcept |
| Splits str into two substrings around the last occurrence of a separator character.
|
|
constexpr std::pair< std::string_view, std::string_view > | wpi::rsplit (std::string_view str, std::string_view separator) noexcept |
| Splits str into two substrings around the last occurrence of a separator string.
|
|
void | wpi::split (std::string_view str, SmallVectorImpl< std::string_view > &arr, std::string_view separator, int maxSplit=-1, bool keepEmpty=true) noexcept |
| Splits str into substrings around the occurrences of a separator string.
|
|
void | wpi::split (std::string_view str, SmallVectorImpl< std::string_view > &arr, char separator, int maxSplit=-1, bool keepEmpty=true) noexcept |
| Splits str into substrings around the occurrences of a separator character.
|
|
constexpr std::string_view | wpi::ltrim (std::string_view str, char ch) noexcept |
| Returns str with consecutive ch characters starting from the the left removed.
|
|
constexpr std::string_view | wpi::ltrim (std::string_view str, std::string_view chars=" \t\n\v\f\r") noexcept |
| Returns str with consecutive characters in chars starting from the left removed.
|
|
constexpr std::string_view | wpi::rtrim (std::string_view str, char ch) noexcept |
| Returns str with consecutive Char characters starting from the right removed.
|
|
constexpr std::string_view | wpi::rtrim (std::string_view str, std::string_view chars=" \t\n\v\f\r") noexcept |
| Returns str with consecutive characters in chars starting from the right removed.
|
|
constexpr std::string_view | wpi::trim (std::string_view str, char ch) noexcept |
| Returns str with consecutive ch characters starting from the left and right removed.
|
|
constexpr std::string_view | wpi::trim (std::string_view str, std::string_view chars=" \t\n\v\f\r") noexcept |
| Returns str with consecutive characters in chars starting from the left and right removed.
|
|
bool | wpi::detail::GetAsUnsignedInteger (std::string_view str, unsigned radix, unsigned long long &result) noexcept |
|
bool | wpi::detail::GetAsSignedInteger (std::string_view str, unsigned radix, long long &result) noexcept |
|
bool | wpi::detail::ConsumeUnsignedInteger (std::string_view &str, unsigned radix, unsigned long long &result) noexcept |
|
bool | wpi::detail::ConsumeSignedInteger (std::string_view &str, unsigned radix, long long &result) noexcept |
|
template<typename T , std::enable_if_t< std::numeric_limits< T >::is_signed, bool > = true> |
std::optional< T > | wpi::parse_integer (std::string_view str, unsigned radix) noexcept |
| Parses the string str as an integer of the specified radix.
|
|
template<typename T , std::enable_if_t< std::numeric_limits< T >::is_signed, bool > = true> |
std::optional< T > | wpi::consume_integer (std::string_view *str, unsigned radix) noexcept |
| Parses the string str as an integer of the specified radix.
|
|
template<typename T > |
std::optional< T > | wpi::parse_float (std::string_view str) noexcept |
| Parses the string str as a floating point value.
|
|
template<> |
std::optional< float > | wpi::parse_float< float > (std::string_view str) noexcept |
|
template<> |
std::optional< double > | wpi::parse_float< double > (std::string_view str) noexcept |
|
template<> |
std::optional< long double > | wpi::parse_float< long double > (std::string_view str) noexcept |
|
std::pair< std::string_view, std::string_view > | wpi::UnescapeCString (std::string_view str, SmallVectorImpl< char > &buf) |
| Unescapes a C-style string (reverse operation to raw_ostream::write_escaped).
|
|
template<class OutputIt , class... Args> |
void | wpi::format_to_n_c_str (OutputIt out, std::iter_difference_t< OutputIt > n, fmt::format_string< Args... > fmt, Args &&... args) |
| Like std::format_to_n() in that it writes at most n bytes to the output buffer, but also includes a terminating null byte in n.
|
|