30 #ifndef WSTRING_API_HXX 31 #define WSTRING_API_HXX 45 static inline const wchar_t *
46 StringFind(
const wchar_t *haystack,
const wchar_t *needle) noexcept
48 return wcsstr(haystack, needle);
52 static inline const wchar_t *
53 StringFind(
const wchar_t *haystack,
wchar_t needle,
size_t size) noexcept
55 return wmemchr(haystack, needle, size);
59 static inline wchar_t *
60 StringFind(
wchar_t *haystack,
wchar_t needle,
size_t size) noexcept
62 return wmemchr(haystack, needle, size);
66 static inline const wchar_t *
67 StringFind(
const wchar_t *haystack,
wchar_t needle) noexcept
69 return wcschr(haystack, needle);
73 static inline wchar_t *
76 return wcschr(haystack, needle);
80 static inline const wchar_t *
83 return wcsrchr(haystack, needle);
87 static inline wchar_t *
90 return wcsrchr(haystack, needle);
101 static inline wchar_t *
104 #if defined(_WIN32) || defined(__BIONIC__) || defined(__OpenBSD__) || \ 109 #elif defined(__sun) && defined (__SVR4) 110 return std::wcpcpy(dest, src);
112 return wcpcpy(dest, src);
126 return wcscmp(str1, str2) == 0;
136 return wcsncmp(a, b, length) == 0;
142 static inline wchar_t *
145 #if defined(__sun) && defined (__SVR4) 146 return std::wcsdup(p);
gcc_pure static gcc_nonnull_all bool StringIsEqual(const wchar_t *str1, const wchar_t *str2) noexcept
Checks whether str1 and str2 are equal.
gcc_pure static gcc_nonnull_all const wchar_t * StringFind(const wchar_t *haystack, const wchar_t *needle) noexcept
gcc_pure static gcc_nonnull_all const wchar_t * StringFindLast(const wchar_t *haystack, wchar_t needle) noexcept
static gcc_nonnull_all wchar_t * UnsafeCopyStringP(wchar_t *dest, const wchar_t *src) noexcept
gcc_pure static gcc_nonnull_all size_t StringLength(const wchar_t *p) noexcept
static gcc_nonnull_all void UnsafeCopyString(wchar_t *dest, const wchar_t *src) noexcept
gcc_malloc static gcc_nonnull_all wchar_t * DuplicateString(const wchar_t *p)