20 #ifndef MPD_STRING_UTIL_HXX
21 #define MPD_STRING_UTIL_HXX
37 CopyString(
char *dest,
const char *src,
size_t size) noexcept;
51 return const_cast<char *
>(
StripLeft((
const char *)p));
56 StripLeft(
const char *p,
const char *end) noexcept;
63 StripRight(
const char *p,
const char *end) noexcept;
72 return const_cast<char *
>(
StripRight((
const char *)p,
82 StripRight(
const char *p,
size_t length) noexcept;
95 Strip(
char *p) noexcept;
108 const char *needle) noexcept;
116 ToUpperASCII(
char *dest,
const char *src,
size_t size) noexcept;
gcc_nonnull_all char * CopyString(char *dest, const char *src, size_t size) noexcept
Copy a string.
void ToUpperASCII(char *dest, const char *src, size_t size) noexcept
Convert the specified ASCII string (0x00..0x7f) to upper case.
gcc_pure const char * StripLeft(const char *p) noexcept
Returns a pointer to the first non-whitespace character in the string, or to the end of the string...
gcc_pure const char * StripRight(const char *p, const char *end) noexcept
Determine the string's end as if it was stripped on the right side.
char * Strip(char *p) noexcept
Skip whitespace at the beginning and terminate the string after the last non-whitespace character...
gcc_pure bool StringArrayContainsCase(const char *const *haystack, const char *needle) noexcept
Checks whether a string array contains the specified string.