55 [[nodiscard]]
inline constexpr bool hasExactLength( std::string_view str, std::size_t expectedLength )
noexcept;
63 [[nodiscard]]
inline constexpr bool isEmpty( std::string_view str )
noexcept;
81 [[nodiscard]]
inline constexpr bool isAllDigits( std::string_view str )
noexcept;
93 [[nodiscard]]
inline constexpr bool isWhitespace(
char c )
noexcept;
101 [[nodiscard]]
inline constexpr bool isDigit(
char c )
noexcept;
109 [[nodiscard]]
inline constexpr bool isAlpha(
char c )
noexcept;
130 [[nodiscard]]
inline constexpr bool startsWith( std::string_view str, std::string_view prefix )
noexcept;
139 [[nodiscard]]
inline constexpr bool endsWith( std::string_view str, std::string_view suffix )
noexcept;
148 [[nodiscard]]
inline constexpr bool contains( std::string_view str, std::string_view substr )
noexcept;
157 [[nodiscard]]
inline constexpr bool equals( std::string_view lhs, std::string_view rhs )
noexcept;
166 [[nodiscard]]
inline bool iequals( std::string_view lhs, std::string_view rhs )
noexcept;
176 [[nodiscard]]
inline std::size_t
count( std::string_view str, std::string_view substr )
noexcept;
187 [[nodiscard]]
inline std::size_t
countOverlapping( std::string_view str, std::string_view substr )
noexcept;
196 [[nodiscard]]
inline constexpr std::size_t
count( std::string_view str,
char ch )
noexcept;
207 [[nodiscard]]
inline std::string
replace( std::string_view str, std::string_view oldStr, std::string_view newStr );
218 [[nodiscard]]
inline std::string
replaceAll( std::string_view str, std::string_view oldStr, std::string_view newStr );
229 template <
typename Container>
230 [[nodiscard]]
inline std::string
join(
const Container& elements, std::string_view delimiter );
242 template <
typename Iterator>
243 [[nodiscard]]
inline std::string
join( Iterator begin, Iterator end, std::string_view delimiter );
253 [[nodiscard]]
inline std::string
reverse( std::string_view str );
264 [[nodiscard]]
inline constexpr std::size_t
indexOf( std::string_view str, std::string_view substr )
noexcept;
275 [[nodiscard]]
inline constexpr std::size_t
lastIndexOf( std::string_view str, std::string_view substr )
noexcept;
290 [[nodiscard]]
inline std::string
padLeft( std::string_view str, std::size_t width,
char fillChar =
' ' );
301 [[nodiscard]]
inline std::string
padRight( std::string_view str, std::size_t width,
char fillChar =
' ' );
313 [[nodiscard]]
inline std::string
center( std::string_view str, std::size_t width,
char fillChar =
' ' );
323 [[nodiscard]]
inline std::string
repeat( std::string_view str, std::size_t
count );
336 [[nodiscard]]
inline constexpr std::string_view
trimStart( std::string_view str )
noexcept;
345 [[nodiscard]]
inline constexpr std::string_view
trimEnd( std::string_view str )
noexcept;
354 [[nodiscard]]
inline constexpr std::string_view
trim( std::string_view str )
noexcept;
368 [[nodiscard]]
inline std::string
toLower( std::string_view str );
378 [[nodiscard]]
inline std::string
toUpper( std::string_view str );
391 [[nodiscard]]
inline constexpr char toLower(
char c )
noexcept;
400 [[nodiscard]]
inline constexpr char toUpper(
char c )
noexcept;
414 [[nodiscard]]
inline bool tryParseBool( std::string_view str,
bool& result )
noexcept;
423 [[nodiscard]]
inline bool tryParseInt( std::string_view str,
int& result )
noexcept;
432 [[nodiscard]]
inline bool tryParseUInt( std::string_view str, std::uint32_t& result )
noexcept;
441 [[nodiscard]]
inline bool tryParseLong( std::string_view str, std::int64_t& result )
noexcept;
452 [[nodiscard]]
inline bool tryParseFloat( std::string_view str,
float& result )
noexcept;
463 [[nodiscard]]
inline bool tryParseDouble( std::string_view str,
double& result )
noexcept;
488 [[nodiscard]]
inline constexpr bool isURIReserved( std::string_view str )
noexcept;
519 [[nodiscard]]
inline constexpr bool isIPv4Address( std::string_view str )
noexcept;
529 [[nodiscard]]
inline constexpr bool isIPv6Address( std::string_view str )
noexcept;
554 [[nodiscard]]
inline constexpr bool isDomainName( std::string_view str )
noexcept;
568 [[nodiscard]]
inline constexpr bool isValidPort( std::string_view str )
noexcept;
581 template <
typename T,
typename = std::enable_if_t<std::is_
integral_v<T>>>
582 [[nodiscard, deprecated(
"Will be removed in v2.0.0. Use manual range check: (port >= 0 && port <= 65535)" )]]
601 std::string_view& host,
602 uint16_t& port )
noexcept;
605#include "nfx/detail/string/Utils.inl"
constexpr bool isAlphaNumeric(char c) noexcept
Check if character is ASCII alphanumeric.
std::string toLower(std::string_view str)
Convert string to lowercase.
std::string replaceAll(std::string_view str, std::string_view oldStr, std::string_view newStr)
Replace all occurrences of substring with replacement.
bool tryParseDouble(std::string_view str, double &result) noexcept
Fast double parsing with error handling.
bool iequals(std::string_view lhs, std::string_view rhs) noexcept
Fast case-insensitive string comparison.
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 bool isNullOrWhiteSpace(std::string_view str) noexcept
Fast check if string is null, empty, or contains only whitespace.
bool tryParseFloat(std::string_view str, float &result) noexcept
Fast float parsing with error handling.
constexpr bool isEmpty(std::string_view str) noexcept
Fast check if string is empty.
std::string toUpper(std::string_view str)
Convert string to uppercase.
constexpr bool isValidPort(std::string_view str) noexcept
Validate port number string (RFC 6335).
bool tryParseEndpoint(std::string_view endpoint, std::string_view &host, uint16_t &port) noexcept
Parse network endpoint into host and port.
std::string repeat(std::string_view str, std::size_t count)
Repeat string specified number of times.
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.
constexpr std::string_view trimStart(std::string_view str) noexcept
Remove leading whitespace from string.
constexpr bool isURIReserved(char c) noexcept
Check if character is URI reserved (RFC 3986 Section 2.2).
bool tryParseBool(std::string_view str, bool &result) noexcept
Fast boolean parsing with error handling.
constexpr bool isValidHostname(std::string_view str) noexcept
Validate hostname format (RFC 1123).
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.
bool tryParseLong(std::string_view str, std::int64_t &result) noexcept
Fast long integer parsing with error handling.
constexpr bool isDomainName(std::string_view str) noexcept
Validate domain name format (RFC 1035).
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.
bool tryParseUInt(std::string_view str, std::uint32_t &result) noexcept
Fast unsigned integer parsing with error handling.
constexpr bool isIPv4Address(std::string_view str) noexcept
Validate IPv4 address format (RFC 791).
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 bool endsWith(std::string_view str, std::string_view suffix) noexcept
Fast check if string ends with suffix.
std::size_t countOverlapping(std::string_view str, std::string_view substr) noexcept
Count overlapping occurrences of substring in string.
bool tryParseInt(std::string_view str, int &result) noexcept
Fast integer parsing with error handling.
constexpr bool startsWith(std::string_view str, std::string_view prefix) noexcept
Fast check if string starts with prefix.
constexpr bool isDigit(char c) noexcept
Check if character is ASCII digit.
constexpr bool isURIUnreserved(char c) noexcept
Check if character is URI unreserved (RFC 3986 Section 2.3).
constexpr bool isWhitespace(char c) noexcept
Check if character is whitespace.
constexpr bool contains(std::string_view str, std::string_view substr) noexcept
Fast check if string contains substring.
constexpr bool isAllDigits(std::string_view str) noexcept
Check if string contains only ASCII digits.
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 isIPv6Address(std::string_view str) noexcept
Validate IPv6 address format (RFC 4291, RFC 5952).