util/StringAPI: add strpbrk() wrapper
This commit is contained in:
parent
998227cffc
commit
6448b31b11
@ -94,6 +94,13 @@ StringFindLast(char *haystack, char needle) noexcept
|
|||||||
return strrchr(haystack, needle);
|
return strrchr(haystack, needle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gcc_pure gcc_nonnull_all
|
||||||
|
static inline const char *
|
||||||
|
StringFindAny(const char *haystack, const char *accept) noexcept
|
||||||
|
{
|
||||||
|
return strpbrk(haystack, accept);
|
||||||
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline char *
|
||||||
StringToken(char *str, const char *delim) noexcept
|
StringToken(char *str, const char *delim) noexcept
|
||||||
{
|
{
|
||||||
|
@ -90,6 +90,13 @@ StringFindLast(wchar_t *haystack, wchar_t needle) noexcept
|
|||||||
return wcsrchr(haystack, needle);
|
return wcsrchr(haystack, needle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gcc_pure gcc_nonnull_all
|
||||||
|
static inline const wchar_t *
|
||||||
|
StringFindAny(const wchar_t *haystack, const wchar_t *accept) noexcept
|
||||||
|
{
|
||||||
|
return wcspbrk(haystack, accept);
|
||||||
|
}
|
||||||
|
|
||||||
gcc_nonnull_all
|
gcc_nonnull_all
|
||||||
static inline void
|
static inline void
|
||||||
UnsafeCopyString(wchar_t *dest, const wchar_t *src) noexcept
|
UnsafeCopyString(wchar_t *dest, const wchar_t *src) noexcept
|
||||||
|
Loading…
Reference in New Issue
Block a user