56 [[nodiscard]]
inline constexpr bool hasExactLength( std::string_view str, std::size_t expectedLength )
noexcept;
64 [[nodiscard]]
inline constexpr bool isEmpty( std::string_view str )
noexcept;
82 [[nodiscard]]
inline constexpr bool isAllDigits( std::string_view str )
noexcept;
94 [[nodiscard]]
inline constexpr bool isWhitespace(
char c )
noexcept;
102 [[nodiscard]]
inline constexpr bool isDigit(
char c )
noexcept;
110 [[nodiscard]]
inline constexpr bool isAlpha(
char c )
noexcept;
126 [[nodiscard]]
inline constexpr bool isHexDigit(
char c )
noexcept;
134 [[nodiscard]]
inline constexpr bool isOctal(
char c )
noexcept;
147 [[nodiscard]]
inline constexpr bool startsWith( std::string_view str, std::string_view prefix )
noexcept;
156 [[nodiscard]]
inline constexpr bool startsWith( std::string_view str,
char prefix )
noexcept;
165 [[nodiscard]]
inline constexpr bool startsWith( std::string_view str,
const char* prefix )
noexcept;
176 [[nodiscard]]
inline bool istartsWith( std::string_view str, std::string_view prefix )
noexcept;
187 [[nodiscard]]
inline bool istartsWith( std::string_view str,
char prefix )
noexcept;
198 [[nodiscard]]
inline bool istartsWith( std::string_view str,
const char* prefix )
noexcept;
207 [[nodiscard]]
inline constexpr bool endsWith( std::string_view str, std::string_view suffix )
noexcept;
216 [[nodiscard]]
inline constexpr bool endsWith( std::string_view str,
char suffix )
noexcept;
225 [[nodiscard]]
inline constexpr bool endsWith( std::string_view str,
const char* suffix )
noexcept;
236 [[nodiscard]]
inline bool iendsWith( std::string_view str, std::string_view suffix )
noexcept;
247 [[nodiscard]]
inline bool iendsWith( std::string_view str,
char suffix )
noexcept;
258 [[nodiscard]]
inline bool iendsWith( std::string_view str,
const char* suffix )
noexcept;
267 [[nodiscard]]
inline constexpr bool contains( std::string_view str, std::string_view substr )
noexcept;
276 [[nodiscard]]
inline constexpr bool contains( std::string_view str,
char ch )
noexcept;
285 [[nodiscard]]
inline constexpr bool contains( std::string_view str,
const char* substr )
noexcept;
296 [[nodiscard]]
inline bool icontains( std::string_view str, std::string_view substr )
noexcept;
307 [[nodiscard]]
inline bool icontains( std::string_view str,
char ch )
noexcept;
318 [[nodiscard]]
inline bool icontains( std::string_view str,
const char* substr )
noexcept;
327 [[nodiscard]]
inline constexpr bool equals( std::string_view lhs, std::string_view rhs )
noexcept;
336 [[nodiscard]]
inline bool iequals( std::string_view lhs, std::string_view rhs )
noexcept;
346 [[nodiscard]]
inline std::size_t
count( std::string_view str, std::string_view substr )
noexcept;
357 [[nodiscard]]
inline std::size_t
countOverlapping( std::string_view str, std::string_view substr )
noexcept;
366 [[nodiscard]]
inline constexpr std::size_t
count( std::string_view str,
char ch )
noexcept;
377 [[nodiscard]]
inline std::string
replace( std::string_view str, std::string_view oldStr, std::string_view newStr );
388 [[nodiscard]]
inline std::string
replaceAll( std::string_view str, std::string_view oldStr, std::string_view newStr );
399 template <
typename Container>
400 [[nodiscard]]
inline std::string
join(
const Container& elements, std::string_view delimiter );
412 template <
typename Iterator>
413 [[nodiscard]]
inline std::string
join( Iterator begin, Iterator end, std::string_view delimiter );
423 [[nodiscard]]
inline std::string
reverse( std::string_view str );
434 [[nodiscard]]
inline constexpr std::size_t
indexOf( std::string_view str, std::string_view substr )
noexcept;
445 [[nodiscard]]
inline constexpr std::size_t
indexOf( std::string_view str,
char ch )
noexcept;
456 [[nodiscard]]
inline constexpr std::size_t
lastIndexOf( std::string_view str, std::string_view substr )
noexcept;
467 [[nodiscard]]
inline constexpr std::size_t
lastIndexOf( std::string_view str,
char ch )
noexcept;
482 [[nodiscard]]
inline std::string
padLeft( std::string_view str, std::size_t width,
char fillChar =
' ' );
493 [[nodiscard]]
inline std::string
padRight( std::string_view str, std::size_t width,
char fillChar =
' ' );
505 [[nodiscard]]
inline std::string
center( std::string_view str, std::size_t width,
char fillChar =
' ' );
515 [[nodiscard]]
inline std::string
repeat( std::string_view str, std::size_t
count );
529 [[nodiscard]]
inline constexpr std::string_view
substringBefore( std::string_view str, std::string_view delimiter )
noexcept;
539 [[nodiscard]]
inline constexpr std::string_view
substringBefore( std::string_view str,
char delimiter )
noexcept;
549 [[nodiscard]]
inline constexpr std::string_view
substringAfter( std::string_view str, std::string_view delimiter )
noexcept;
559 [[nodiscard]]
inline constexpr std::string_view
substringAfter( std::string_view str,
char delimiter )
noexcept;
569 [[nodiscard]]
inline constexpr std::string_view
substringBeforeLast( std::string_view str, std::string_view delimiter )
noexcept;
579 [[nodiscard]]
inline constexpr std::string_view
substringBeforeLast( std::string_view str,
char delimiter )
noexcept;
589 [[nodiscard]]
inline constexpr std::string_view
substringAfterLast( std::string_view str, std::string_view delimiter )
noexcept;
599 [[nodiscard]]
inline constexpr std::string_view
substringAfterLast( std::string_view str,
char delimiter )
noexcept;
611 [[nodiscard]]
inline constexpr std::string_view
extractBetween( std::string_view str, std::string_view start, std::string_view end )
noexcept;
621 [[nodiscard]]
inline constexpr std::string_view
removePrefix( std::string_view str, std::string_view prefix )
noexcept;
631 [[nodiscard]]
inline constexpr std::string_view
removeSuffix( std::string_view str, std::string_view suffix )
noexcept;
645 [[nodiscard]]
inline std::string
removeAll( std::string_view str,
char ch );
656 [[nodiscard]]
inline std::string
removeAll( std::string_view str, std::string_view substr );
667 template <
typename Predicate>
668 [[nodiscard]]
inline std::string
removeIf( std::string_view str, Predicate pred );
702 [[nodiscard]]
inline constexpr std::string_view
trimStart( std::string_view str )
noexcept;
711 [[nodiscard]]
inline constexpr std::string_view
trimEnd( std::string_view str )
noexcept;
720 [[nodiscard]]
inline constexpr std::string_view
trim( std::string_view str )
noexcept;
736 template <
typename Predicate>
737 [[nodiscard]]
inline constexpr std::string_view
trimStartIf( std::string_view str, Predicate pred )
noexcept;
749 template <
typename Predicate>
750 [[nodiscard]]
inline constexpr std::string_view
trimEndIf( std::string_view str, Predicate pred )
noexcept;
762 template <
typename Predicate>
763 [[nodiscard]]
inline constexpr std::string_view
trimIf( std::string_view str, Predicate pred )
noexcept;
774 template <
typename Predicate>
775 [[nodiscard]]
inline constexpr std::size_t
countIf( std::string_view str, Predicate pred )
noexcept;
786 template <
typename Predicate>
787 [[nodiscard]]
inline constexpr std::size_t
findIf( std::string_view str, Predicate pred )
noexcept;
798 template <
typename Predicate>
799 [[nodiscard]]
inline constexpr std::size_t
findIfNot( std::string_view str, Predicate pred )
noexcept;
812 template <
typename Predicate>
813 [[nodiscard]]
inline std::string
replaceIf( std::string_view str, Predicate pred,
char replacement );
827 [[nodiscard]]
inline std::string
toLower( std::string_view str );
837 [[nodiscard]]
inline std::string
toUpper( std::string_view str );
850 [[nodiscard]]
inline constexpr char toLower(
char c )
noexcept;
859 [[nodiscard]]
inline constexpr char toUpper(
char c )
noexcept;
873 [[nodiscard]]
inline constexpr int hexToInt(
char c )
noexcept;
881 [[nodiscard]]
inline constexpr int octalToInt(
char c )
noexcept;
889 [[nodiscard]]
inline constexpr int digitToInt(
char c )
noexcept;
908 [[nodiscard]]
inline bool decodeUtf8Codepoint( std::string_view str, std::size_t& i, uint32_t& codepoint )
noexcept;
930 [[nodiscard]]
inline std::size_t
utf8Length( std::string_view str )
noexcept;
942 [[nodiscard]]
inline bool isValidUtf8( std::string_view str )
noexcept;
957 std::size_t startCodepoint,
958 std::size_t codepointCount = std::string_view::npos )
noexcept;
971 template <
typename T>
973 std::is_same_v<std::decay_t<T>,
bool> ||
974 std::is_same_v<std::decay_t<T>,
int> ||
975 std::is_same_v<std::decay_t<T>, std::uint32_t> ||
976 std::is_same_v<std::decay_t<T>, std::int64_t> ||
977 std::is_same_v<std::decay_t<T>, std::uint64_t> ||
978 std::is_same_v<std::decay_t<T>,
float> ||
979 std::is_same_v<std::decay_t<T>,
double> )
980 [[nodiscard]]
inline bool fromString( std::string_view str, T& result )
noexcept;
988 template <
typename T>
990 std::is_same_v<std::decay_t<T>,
bool> ||
991 std::is_same_v<std::decay_t<T>,
int> ||
992 std::is_same_v<std::decay_t<T>, std::uint32_t> ||
993 std::is_same_v<std::decay_t<T>, std::int64_t> ||
994 std::is_same_v<std::decay_t<T>, std::uint64_t> ||
995 std::is_same_v<std::decay_t<T>,
float> ||
996 std::is_same_v<std::decay_t<T>,
double> )
997 [[nodiscard]]
inline std::optional<T>
fromString( std::string_view str )
noexcept;
1022 [[nodiscard]]
inline constexpr bool isUriReserved( std::string_view str )
noexcept;
1054 [[nodiscard]]
inline std::string
urlEncode( std::string_view str );
1065 [[nodiscard]]
inline std::string
urlDecode( std::string_view str )
noexcept;
1084 [[nodiscard]]
inline std::string
jsonEscape( std::string_view str,
bool escapeNonAscii =
false,
bool escapeForHtml =
false );
1096 [[nodiscard]]
inline std::string
jsonUnescape( std::string_view str )
noexcept;
1117 [[nodiscard]]
inline std::string
xmlEscape( std::string_view str,
bool escapeNonAscii =
false );
1129 [[nodiscard]]
inline std::string
xmlUnescape( std::string_view str )
noexcept;
1147 [[nodiscard]]
inline std::string
cppEscape( std::string_view str );
1160 [[nodiscard]]
inline std::string
cppUnescape( std::string_view str )
noexcept;
1175 [[nodiscard]]
inline std::string
truncate( std::string_view str,
size_t maxLength );
1188 [[nodiscard]]
inline std::string
truncate( std::string_view str,
size_t maxLength, std::string_view ellipsis );
1201 [[nodiscard]]
inline std::string
wordWrap( std::string_view str,
size_t width );
1213 [[nodiscard]]
inline std::string
indent( std::string_view str,
size_t spaces );
1224 [[nodiscard]]
inline std::string
dedent( std::string_view str );
1239 [[nodiscard]]
inline constexpr int compareIgnoreCase( std::string_view lhs, std::string_view rhs )
noexcept;
1251 [[nodiscard]]
inline constexpr int naturalCompare( std::string_view lhs, std::string_view rhs )
noexcept;
1264 [[nodiscard]]
inline constexpr int inaturalCompare( std::string_view lhs, std::string_view rhs )
noexcept;
1276 [[nodiscard]]
inline constexpr bool naturalSort( std::string_view a, std::string_view b )
noexcept;
1290 [[nodiscard]]
inline constexpr bool inaturalSort( std::string_view a, std::string_view b )
noexcept;
1301 [[nodiscard]]
inline constexpr std::string_view
commonPrefix( std::string_view lhs, std::string_view rhs )
noexcept;
1312 [[nodiscard]]
inline constexpr std::string_view
commonSuffix( std::string_view lhs, std::string_view rhs )
noexcept;
1325 [[nodiscard]]
inline constexpr bool isIpv4Address( std::string_view str )
noexcept;
1334 [[nodiscard]]
inline constexpr bool isIpv6Address( std::string_view str )
noexcept;
1349 [[nodiscard]]
inline constexpr bool isHostname( std::string_view str )
noexcept;
1358 [[nodiscard]]
inline constexpr bool isIdnHostname( std::string_view str )
noexcept;
1368 [[nodiscard]]
inline constexpr bool isDomainName( std::string_view str )
noexcept;
1382 [[nodiscard]]
inline constexpr bool isPortNumber( std::string_view str )
noexcept;
1400 std::string_view& host,
1401 uint16_t& port )
noexcept;
1416 [[nodiscard]]
inline constexpr bool isDateTime( std::string_view str )
noexcept;
1426 [[nodiscard]]
inline constexpr bool isDate( std::string_view str )
noexcept;
1436 [[nodiscard]]
inline constexpr bool isTime( std::string_view str )
noexcept;
1446 [[nodiscard]]
inline constexpr bool isDuration( std::string_view str )
noexcept;
1461 [[nodiscard]]
inline constexpr bool isEmail( std::string_view str )
noexcept;
1470 [[nodiscard]]
inline constexpr bool isIdnEmail( std::string_view str )
noexcept;
1484 [[nodiscard]]
inline constexpr bool isUuid( std::string_view str )
noexcept;
1498 [[nodiscard]]
inline constexpr bool isUri( std::string_view str )
noexcept;
1520 [[nodiscard]]
inline constexpr bool isUriTemplate( std::string_view str )
noexcept;
1534 [[nodiscard]]
inline constexpr bool isIri( std::string_view str )
noexcept;
1559 [[nodiscard]]
inline constexpr bool isJsonPointer( std::string_view str )
noexcept;
1572#include "nfx/detail/string/Utils.inl"
constexpr bool isAlphaNumeric(char c) noexcept
Check if character is ASCII alphanumeric.
constexpr int hexToInt(char c) noexcept
Convert a hexadecimal character to its integer value.
std::string truncate(std::string_view str, size_t maxLength)
Truncate string to maximum length.
constexpr std::string_view substringAfter(std::string_view str, std::string_view delimiter) noexcept
Extract substring after first occurrence of delimiter.
std::string toLower(std::string_view str)
Convert string to lowercase.
constexpr std::string_view extractBetween(std::string_view str, std::string_view start, std::string_view end) noexcept
Extract substring between start and end delimiters.
std::string replaceAll(std::string_view str, std::string_view oldStr, std::string_view newStr)
Replace all occurrences of substring with replacement.
constexpr std::string_view removePrefix(std::string_view str, std::string_view prefix) noexcept
Remove prefix from string if present.
constexpr bool inaturalSort(std::string_view a, std::string_view b) noexcept
Case-insensitive natural sort comparison predicate.
constexpr bool isIdnEmail(std::string_view str) noexcept
Validate Internationalized email address format (EAI/SMTPUTF8).
bool isValidUtf8(std::string_view str) noexcept
Validate that a string contains valid UTF-8 encoding.
constexpr bool isIdnHostname(std::string_view str) noexcept
Validate Internationalized Domain Name (IDN) hostname format.
bool iequals(std::string_view lhs, std::string_view rhs) noexcept
Fast case-insensitive string comparison.
constexpr bool isOctal(char c) noexcept
Check if character is ASCII octal digit.
constexpr std::size_t lastIndexOf(std::string_view str, std::string_view substr) noexcept
Find last occurrence of substring.
std::string reverse(std::string_view str)
Reverse a string.
constexpr int inaturalCompare(std::string_view lhs, std::string_view rhs) noexcept
Case-insensitive natural sorting comparison (handles embedded numbers).
constexpr bool isNullOrWhiteSpace(std::string_view str) noexcept
Fast check if string is null, empty, or contains only whitespace.
std::string replaceIf(std::string_view str, Predicate pred, char replacement)
Replace characters matching predicate with replacement character.
constexpr bool isEmpty(std::string_view str) noexcept
Fast check if string is empty.
bool iendsWith(std::string_view str, std::string_view suffix) noexcept
Case-insensitive check if string ends with suffix.
std::string toUpper(std::string_view str)
Convert string to uppercase.
constexpr bool isDuration(std::string_view str) noexcept
Validate ISO 8601 duration format.
bool fromString(std::string_view str, T &result) noexcept
Parse string to type T using output parameter.
bool tryParseEndpoint(std::string_view endpoint, std::string_view &host, uint16_t &port) noexcept
Parse network endpoint into host and port.
constexpr bool isUuid(std::string_view str) noexcept
Validate UUID format (RFC 4122).
std::string repeat(std::string_view str, std::size_t count)
Repeat string specified number of times.
constexpr std::string_view substringAfterLast(std::string_view str, std::string_view delimiter) noexcept
Extract substring after last occurrence of delimiter.
std::string replace(std::string_view str, std::string_view oldStr, std::string_view newStr)
Replace first occurrence of substring with replacement.
constexpr bool equals(std::string_view lhs, std::string_view rhs) noexcept
Fast case-sensitive string comparison.
std::string_view utf8Substring(std::string_view str, std::size_t startCodepoint, std::size_t codepointCount=std::string_view::npos) noexcept
Extract a substring by Unicode codepoint positions.
constexpr std::string_view trimStart(std::string_view str) noexcept
Remove leading whitespace from string.
std::size_t utf8Length(std::string_view str) noexcept
Count the number of Unicode codepoints in a UTF-8 string.
constexpr bool isPortNumber(std::string_view str) noexcept
Validate port number string (RFC 6335).
constexpr bool isEmail(std::string_view str) noexcept
Validate email address format (RFC 5321).
constexpr int octalToInt(char c) noexcept
Convert an octal character to its integer value.
constexpr bool isUriTemplate(std::string_view str) noexcept
Validate URI Template format (RFC 6570).
constexpr bool isTime(std::string_view str) noexcept
Validate RFC 3339 full-time format.
constexpr bool isUriReserved(char c) noexcept
Check if character is URI reserved (RFC 3986 Section 2.2).
constexpr std::string_view trimIf(std::string_view str, Predicate pred) noexcept
Remove leading and trailing characters matching predicate.
constexpr bool isAlpha(char c) noexcept
Check if character is ASCII alphabetic.
std::string join(const Container &elements, std::string_view delimiter)
Join container elements with delimiter.
constexpr bool hasExactLength(std::string_view str, std::size_t expectedLength) noexcept
Fast check if string has exact length.
std::string urlDecode(std::string_view str) noexcept
Decode percent-encoded URL string (RFC 3986).
constexpr bool isDomainName(std::string_view str) noexcept
Validate domain name format (RFC 1035).
bool istartsWith(std::string_view str, std::string_view prefix) noexcept
Case-insensitive check if string starts with prefix.
constexpr bool isIriReference(std::string_view str) noexcept
Validate IRI-reference format (RFC 3987).
constexpr bool isUri(std::string_view str) noexcept
Validate URI format (RFC 3986).
constexpr std::size_t countIf(std::string_view str, Predicate pred) noexcept
Count characters matching predicate.
constexpr bool isRelativeJsonPointer(std::string_view str) noexcept
Validate relative JSON Pointer format.
constexpr std::string_view commonPrefix(std::string_view lhs, std::string_view rhs) noexcept
Find longest common prefix of two strings.
std::string removeAll(std::string_view str, char ch)
Remove all occurrences of a character from string.
constexpr std::size_t indexOf(std::string_view str, std::string_view substr) noexcept
Find first occurrence of substring.
std::string center(std::string_view str, std::size_t width, char fillChar=' ')
Center string within specified width.
constexpr int digitToInt(char c) noexcept
Convert a decimal digit character to its integer value.
std::string removeIf(std::string_view str, Predicate pred)
Remove all characters matching a predicate from string.
void encodeUtf8Codepoint(std::string &result, uint32_t codepoint) noexcept
Encode a Unicode code point to UTF-8.
constexpr bool isDate(std::string_view str) noexcept
Validate RFC 3339 full-date format.
std::string cppEscape(std::string_view str)
Escape string for use as C/C++ string literal.
std::string cppUnescape(std::string_view str) noexcept
Unescape C/C++ string literal escape sequences.
std::string padLeft(std::string_view str, std::size_t width, char fillChar=' ')
Pad string on the left to reach specified width.
constexpr std::string_view trimEnd(std::string_view str) noexcept
Remove trailing whitespace from string.
std::size_t count(std::string_view str, std::string_view substr) noexcept
Count occurrences of substring in string.
constexpr std::size_t findIf(std::string_view str, Predicate pred) noexcept
Find first character matching predicate.
constexpr bool endsWith(std::string_view str, std::string_view suffix) noexcept
Fast check if string ends with suffix.
std::string xmlEscape(std::string_view str, bool escapeNonAscii=false)
Escape string for use in XML/HTML content.
constexpr std::string_view trimStartIf(std::string_view str, Predicate pred) noexcept
Remove leading characters matching predicate.
std::string jsonEscape(std::string_view str, bool escapeNonAscii=false, bool escapeForHtml=false)
Escape string for use in JSON (RFC 8259).
bool decodeUtf8Codepoint(std::string_view str, std::size_t &i, uint32_t &codepoint) noexcept
Decode a UTF-8 sequence starting at position i.
std::string collapseWhitespace(std::string_view str)
Collapse consecutive whitespace characters to single space.
constexpr std::string_view commonSuffix(std::string_view lhs, std::string_view rhs) noexcept
Find longest common suffix of two strings.
std::string indent(std::string_view str, size_t spaces)
Add indentation to all lines.
constexpr std::string_view removeSuffix(std::string_view str, std::string_view suffix) noexcept
Remove suffix from string if present.
std::string urlEncode(std::string_view str)
Encode string for use in URLs (percent-encoding per RFC 3986).
std::size_t countOverlapping(std::string_view str, std::string_view substr) noexcept
Count overlapping occurrences of substring in string.
constexpr std::size_t findIfNot(std::string_view str, Predicate pred) noexcept
Find first character NOT matching predicate.
std::string jsonUnescape(std::string_view str) noexcept
Unescape JSON string literal (RFC 8259).
constexpr bool startsWith(std::string_view str, std::string_view prefix) noexcept
Fast check if string starts with prefix.
std::string xmlUnescape(std::string_view str) noexcept
Unescape XML/HTML entity references.
constexpr bool isIpv4Address(std::string_view str) noexcept
Validate IPv4 address format (RFC 791).
constexpr bool isDigit(char c) noexcept
Check if character is ASCII digit.
constexpr int compareIgnoreCase(std::string_view lhs, std::string_view rhs) noexcept
Case-insensitive three-way comparison.
constexpr bool naturalSort(std::string_view a, std::string_view b) noexcept
Case-sensitive natural sort comparison predicate.
std::string wordWrap(std::string_view str, size_t width)
Wrap text to specified width.
constexpr bool isIri(std::string_view str) noexcept
Validate IRI format (RFC 3987).
constexpr std::string_view trimEndIf(std::string_view str, Predicate pred) noexcept
Remove trailing characters matching predicate.
constexpr std::string_view substringBeforeLast(std::string_view str, std::string_view delimiter) noexcept
Extract substring before last occurrence of delimiter.
constexpr bool isDateTime(std::string_view str) noexcept
Validate RFC 3339 date-time format.
constexpr bool isWhitespace(char c) noexcept
Check if character is whitespace.
bool icontains(std::string_view str, std::string_view substr) noexcept
Case-insensitive check if string contains substring.
constexpr std::string_view substringBefore(std::string_view str, std::string_view delimiter) noexcept
Extract substring before first occurrence of delimiter.
constexpr bool isIpv6Address(std::string_view str) noexcept
Validate IPv6 address format (RFC 4291, RFC 5952).
constexpr bool isUriReference(std::string_view str) noexcept
Validate URI-reference format (RFC 3986).
constexpr bool isJsonPointer(std::string_view str) noexcept
Validate JSON Pointer format (RFC 6901).
constexpr bool contains(std::string_view str, std::string_view substr) noexcept
Fast check if string contains substring.
std::string dedent(std::string_view str)
Remove common leading whitespace from all lines.
constexpr int naturalCompare(std::string_view lhs, std::string_view rhs) noexcept
Natural sorting comparison (handles embedded numbers).
constexpr bool isAllDigits(std::string_view str) noexcept
Check if string contains only ASCII digits.
std::string removeWhitespace(std::string_view str)
Remove all whitespace characters from string.
constexpr bool isHostname(std::string_view str) noexcept
Validate hostname format (RFC 1123).
std::string padRight(std::string_view str, std::size_t width, char fillChar=' ')
Pad string on the right to reach specified width.
constexpr std::string_view trim(std::string_view str) noexcept
Remove leading and trailing whitespace from string.
constexpr bool isUriUnreserved(char c) noexcept
Check if character is URI unreserved (RFC 3986 Section 2.3).
constexpr bool isHexDigit(char c) noexcept
Check if character is ASCII hexadecimal digit.