ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
chararray.hpp
Go to the documentation of this file.
1/** ************************************************************************************************
2 * \file
3 * This header file is part of module \alib_characters of the \aliblong.
4 *
5 * \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
6 * Published under \ref mainpage_license "Boost Software License".
7 **************************************************************************************************/
8#ifndef HPP_ALIB_CHARACTERS_CHARARRAY
9#define HPP_ALIB_CHARACTERS_CHARARRAY 1
10
11
12#if !defined (HPP_ALIB_CHARACTERS_CHARACTERS)
14#endif
15
16#if !defined (HPP_ALIB_LANG_COMMONENUMS_DEFS)
18#endif
19
20#if !defined (_GLIBCXX_NUMERIC_LIMITS) && !defined(_LIMITS_)
21# include <limits>
22#endif
23#if !defined (_GLIBCXX_CSTRING) && !defined(_CSTRING_)
24# include <cstring>
25#endif
26
27#if !defined (_GLIBCXX_CCTYPE) && !defined(_CCTYPE_)
28# include <cctype>
29#endif
30
31#if !defined (_GLIBCXX_CWCTYPE) && !defined(_CWCTYPE_)
32# include <cwctype>
33#endif
34
35#if !defined (_GLIBCXX_CWCHAR) && !defined(_CWCHAR_)
36# include <cwchar>
37#endif
38
39#if !defined (_GLIBCXX_STRING) && !defined(_STRING_)
40# include <string>
41#endif
42namespace alib { namespace characters {
43
44
45/** ************************************************************************************************
46 * This utility struct provides static methods working with character arrays of different
47 * underlying type.<br>
48 * The struct is similar to type traits struct \c std::char_traits of the C++ standard library
49 * and for methods that are existing there already, just inline forwarding methods are defined here.
50 **************************************************************************************************/
51template<typename TChar>
53{
54 /** ********************************************************************************************
55 * Compares two characters of arbitrary types.
56 *
57 * @tparam sensitivity Letter case sensitivity of the comparison.
58 * @tparam TRhs The type of the right hand side letter to compare.
59 * @param lhs The left-hand side character to compare of class template
60 * type \p{TChar}.
61 * @param rhs The right-hand side character to compare of method template
62 * type \p{TCharRhs} .
63 * @return \c true if the given characters are equal, \c false otherwise.
64 **********************************************************************************************/
65 template<lang::Case sensitivity, typename TRhs >
66 static
67 bool Equal( TChar lhs, TRhs rhs )
68 {
69 using TLhs= TChar;
70 bool sensitive= (sensitivity == lang::Case::Sensitive);
71
72 if constexpr ( sizeof(TLhs) == sizeof(TRhs) )
73 return sensitive ? lhs == rhs
74 : ToUpper( lhs) == ToUpper( rhs);
75
76 else if constexpr ( sizeof(TLhs) < sizeof(TRhs) )
77 return sensitive ? static_cast<TRhs>(lhs) == rhs
78 : ToUpper( static_cast<TRhs>(lhs)) == ToUpper( rhs);
79
80 else if constexpr ( sizeof(TLhs) > sizeof(TRhs) )
81 return sensitive ? lhs == static_cast<TLhs>(rhs)
82 : ToUpper( lhs ) == ToUpper(static_cast<TLhs>(rhs));
83 }
84
85 /** ********************************************************************************************
86 * Returns the length of a zero-terminated "c-style" character array.
87 *
88 * Note: This method is implemented as an inlined, direct direct call to
89 * \c std::char_traits::length.
90 *
91 * @param cstring Pointer to zero-terminated character array.
92 *
93 * @return The length of the string.
94 **********************************************************************************************/
95 static
96 integer Length( const TChar* cstring )
97 {
98 return static_cast<integer>( std::char_traits<TChar>::length(cstring) );
99 }
100
101 /** ********************************************************************************************
102 * Copies the contents of a character array into another, non-overlapping (!) array.
103 *
104 * Note: This method is implemented as an inlined, direct direct call to
105 * \c std::char_traits::copy.
106 *
107 * @param src Pointer to the source array.
108 * @param length The length to copy.
109 * @param dest Pointer to the destination array.
110 **********************************************************************************************/
111 static
112 void Copy( const TChar* src, integer length, TChar* dest )
113 {
114 std::char_traits<TChar>::copy( dest, src, static_cast<size_t>(length) );
115 }
116
117 /** ********************************************************************************************
118 * Copies the contents of a character array into another, possibly overlapping array.
119 *
120 * Note: This method is implemented as an inlined, direct direct call to
121 * \c std::char_traits::move.
122 *
123 * @param src Pointer to the source array.
124 * @param length The length to copy.
125 * @param dest Pointer to the destination array, optionally within source.
126 **********************************************************************************************/
127 static
128 void Move( const TChar* src, integer length, TChar* dest )
129 {
130 std::char_traits<TChar>::move( dest, src, static_cast<size_t>(length) );
131 }
132
133 /** ********************************************************************************************
134 * Sets all elements of the given character array to value \p{value}.
135 *
136 * @param dest Pointer to the destination array.
137 * @param length The length to fill.
138 * @param value The value to fill the array with.
139 **********************************************************************************************/
140 static
141 void Fill( TChar* dest, integer length, TChar value );
142
143 /** ********************************************************************************************
144 * Converts a character to upper case.
145 *
146 * @param c The character to convert
147 * @return The upper case version of the given character.
148 **********************************************************************************************/
149 static
150 TChar ToUpper( TChar c );
151
152 /** ********************************************************************************************
153 * Converts a character sequence to upper case.
154 *
155 * @param src Pointer to the character array.
156 * @param length The length of the array.
157 **********************************************************************************************/
158 static
159 void ToUpper( TChar* src, integer length );
160
161 /** ********************************************************************************************
162 * Converts a character to lower case.
163 *
164 * @param c The character to convert
165 * @return The lower case version of the given character.
166 **********************************************************************************************/
167 static
168 TChar ToLower( TChar c );
169
170 /** ********************************************************************************************
171 * Converts a character sequence to lower case.
172 *
173 * @param src Pointer to the character array.
174 * @param length The length of the array.
175 **********************************************************************************************/
176 static
177 void ToLower( TChar* src, integer length );
178
179 /** ********************************************************************************************
180 * Reverses the order of the characters.
181 *
182 * @param src Pointer to the character array.
183 * @param length The length of the array.
184 **********************************************************************************************/
186 static
187 void Reverse( TChar* src, integer length );
189
190 /** ********************************************************************************************
191 * Searches the character. Returns a pointer to the location of \p{needle} in \p{haystack},
192 * respectively \c nullptr if not found.
193 *
194 * Note: This method is implemented as a direct call to \c std::memchr, respectively
195 * other character versions of it.
196 *
197 * @param haystack Pointer to the start of the string.
198 * @param haystackLength The length of the string or the maximum position to search.
199 * @param needle Character to search.
200 *
201 * @return The pointer to the first occurrence of \p{needle} respectively \c nullptr if
202 * not found.
203 **********************************************************************************************/
204 static
205 const TChar* Search( const TChar* haystack, integer haystackLength, TChar needle )
206 {
207 return std::char_traits<TChar>::find( haystack, static_cast<size_t>(haystackLength), needle );
208 }
209
211 /** ********************************************************************************************
212 * Returns the index of the first character in \p{haystack} which is included in a given set
213 * of \p{needles}.
214 *
215 * This method searches up to a given maximum index. For a search to the end of the
216 * zero terminated string, use faster method provided with class
217 * \alib{strings;TCString;CString}.
218
219 * @param haystack Pointer to the start of the string.
220 * @param haystackLength The length of the string or the maximum position to search.
221 * If -1 is provided, the length is determined using % C function
222 * strlen (which needs haystack to be zero terminated).
223 * @param needles Pointer to a set of characters to be searched for.
224 * @param needlesLength The length of the string of needles.
225 * If -1 is provided, the length is determined using % C function
226 * strlen (which needs needles to be zero terminated).
227 *
228 * @return The index of the first character found that is included in \p{needles}.
229 * If no character of haystack is included in \p{needles}, \c -1 is returned.
230 **********************************************************************************************/
231 static
232 integer IndexOfAnyIncluded( const TChar* haystack, integer haystackLength,
233 const TChar* needles, integer needlesLength );
234
235 /** ********************************************************************************************
236 * Same as #IndexOfAnyIncluded(const TChar*,integer,const TChar*,integer) but works on
237 * zero-terminated strings.
238 *
239 * @param haystack Pointer to zero-terminated character array to search in.
240 * @param needles Pointer to zero-terminated set of characters to search for.
241 *
242 * @return The index of the first character found that is included in \p{needles}.
243 * If no character of haystack is included in \p{needles}, \c -1 is returned.
244 **********************************************************************************************/
245 static
246 integer IndexOfAnyIncludedZT( const TChar* haystack, const TChar* needles );
247
248 /** ********************************************************************************************
249 * Returns the index of the first character in \p{haystack} which is not included in a given
250 * set of \p{needles}.
251 *
252 * This method searches up to a given maximum index. For a search to the end of the
253 * zero terminated string, use faster method provided with class
254 * \alib{strings;TCString;CString}.
255
256 * @param haystack Pointer to the start of the string.
257 * @param haystackLength The length of the string or the maximum position to search.
258 * If -1 is provided, the length is determined using % C function
259 * strlen (which needs haystack to be zero terminated).
260 * @param needles Pointer to a set of characters to be searched for.
261 * @param needlesLength The length of the string of needles.
262 * If -1 is provided, the length is determined using % C function
263 * strlen (which needs needles to be zero terminated).
264 *
265 * @return The index of the first character that is not included in \p{needles}.
266 * If all characters of haystack are included in \p{needles}, \c -1 is returned.
267 **********************************************************************************************/
268 static
269 integer IndexOfAnyExcluded( const TChar* haystack, integer haystackLength,
270 const TChar* needles, integer needlesLength );
271
272
273 /** ********************************************************************************************
274 * Same as #IndexOfAnyExcluded(const TChar*,integer,const TChar*,integer) but works on
275 * zero-terminated strings.
276 *
277 * @param haystack Pointer to zero-terminated character array to search in.
278 * @param needles Pointer to zero-terminated set of characters to search for.
279 *
280 * @return The index of the first character that is not included in \p{needles}.
281 * If all characters of haystack are included in \p{needles}, \c -1 is returned.
282 **********************************************************************************************/
283 static
284 integer IndexOfAnyExcludedZT( const TChar* haystack, const TChar* needles );
285
286 /** ********************************************************************************************
287 * Returns the index of the last character in \p{haystack} which is included in a given set
288 * of \p{needles}.
289 *
290 * This method searches backwards from the end of the string.
291 *
292 * @param haystack Pointer to the start of the string.
293 * @param startIdx The position to start the search from. This must be smaller than
294 * the length of the string and greater or equal to zero.
295 * @param needles Pointer to a set of characters to be searched for.
296 * @param needlesLength The length of the string of needles.
297 * If -1 is provided, the length is determined using % C function
298 * strlen (which needs needles to be zero terminated).
299 *
300 * @return The index of the first character found which is included in the given set
301 * of characters. If nothing is found, -1 is returned.
302 **********************************************************************************************/
303 static
304 integer LastIndexOfAnyInclude( const TChar* haystack, integer startIdx,
305 const TChar* needles, integer needlesLength );
306
307 /** ********************************************************************************************
308 * Returns the index of the last character in \p{haystack} which is not included in a given
309 * set of \p{needles}.
310 *
311 * This method searches backwards from the end of the string.
312 *
313 * @param haystack Pointer to the start of the string.
314 * @param startIdx The position to start the search from. This must be smaller than
315 * the length of the string and greater or equal to zero.
316 * @param needles Pointer to a set of characters to be searched for.
317 * @param needlesLength The length of the string of needles.
318 * If -1 is provided, the length is determined using % C function
319 * strlen (which needs needles to be zero terminated).
320 *
321 * @return The index of the first character found which is included in the given set
322 * of characters. If nothing is found, -1 is returned.
323 **********************************************************************************************/
324 static
325 integer LastIndexOfAnyExclude( const TChar* haystack, integer startIdx,
326 const TChar* needles, integer needlesLength );
327
328 /** ********************************************************************************************
329 * Returns the index of the first character which is not equal within two strings.
330 * If \p{haystack} starts with \p{needle}, then the length of \p{needle} is returned.
331 *
332 * @param haystack Pointer to the start of the string.
333 * @param haystackLength The length of the string or the maximum position to search.
334 * If -1 is provided, the length is determined using % C function
335 * strlen (which needs haystack to be zero terminated).
336 * @param needle Pointer to the start of the string to compare with.
337 * @param needleLength The length of \p{needle}.
338 * If -1 is provided, the length is determined using % C function
339 * strlen (which needs needles to be zero terminated).
340 * @param sensitivity Denotes whether the comparison should be made case sensitive
341 * or not.
342 *
343 * @return The index of the first character found which is not equal in given strings.
344 **********************************************************************************************/
345 static
346 integer IndexOfFirstDifference( const TChar* haystack, integer haystackLength,
347 const TChar* needle, integer needleLength,
348 lang::Case sensitivity );
350
351 /** ********************************************************************************************
352 * Searches for a difference in two character arrays of equal length.
353 *
354 * @param lhs The first array to compare.
355 * @param rhs The second array to compare.
356 * @param cmpLength The number of characters to compare.
357 *
358 * @return \c true if the string arrays have identical contents, \c false otherwise.
359 **********************************************************************************************/
360 static
361 bool Equal( const TChar* lhs, const TChar* rhs, integer cmpLength )
362 {
363 return ::memcmp( lhs, rhs, static_cast<size_t>(cmpLength) * sizeof(TChar) ) == 0;
364 }
365
366
367 /** ********************************************************************************************
368 * Compares up to \p{cmpLength} characters of two character arrays.
369 * Comparison stops if termination character \c '\0' is found in one of the arrays.
370 *
371 * @param lhs The first array to compare.
372 * @param rhs The second array to compare.
373 * @param cmpLength The number of characters to compare.
374 *
375 * @return Negative value if lhs appears before rhs in lexicographical order.
376 * \c 0 if lhs and rhs are equal.
377 * Positive value if lhs appears after rhs in lexicographical order.
378 **********************************************************************************************/
379 static
380 int Compare( const TChar* lhs, const TChar* rhs, integer cmpLength )
381 {
382 return std::char_traits<TChar>::compare( lhs, rhs, static_cast<size_t>(cmpLength) );
383 }
384
385 /** ********************************************************************************************
386 * Compares two character arrays of equal length ignoring letter case.
387 *
388 * @param lhs The first array to compare.
389 * @param rhs The second array to compare.
390 * @param cmpLength The number of characters to compare.
391 *
392 * @return Negative value if lhs appears before rhs in lexicographical order.
393 * \c 0 if lhs and rhs are equal.
394 * Positive value if lhs appears after rhs in lexicographical order.
395 **********************************************************************************************/
396 static
397 int CompareIgnoreCase( const TChar* lhs, const TChar* rhs, integer cmpLength );
398
399}; // struct CharArray
400
401//! @cond NO_DOX
402
403// #################################################################################################
404// Narrow character specifics
405// #################################################################################################
406template<> inline void CharArray<nchar>::Fill( nchar* dest, integer length, nchar c )
407{
408 memset( dest, c, static_cast<size_t>(length) );
409}
410
411template<> inline nchar CharArray<nchar>::ToUpper(nchar c)
412{
413 return static_cast<nchar>( toupper(c) );
414}
415
416template<> inline nchar CharArray<nchar>::ToLower(nchar c)
417{
418 return static_cast<nchar>( tolower(c) );
419}
420
422template<> inline void CharArray<nchar>::ToUpper(nchar* src, integer length)
423{
424 nchar* end= src + length;
425 while( src != end )
426 {
427 *src= CharArray<nchar>::ToUpper( *src );
428 ++src;
429 }
430}
431
432template<> inline void CharArray<nchar>::ToLower(nchar* src, integer length)
433{
434 nchar* end= src + length;
435 while( src != end )
436 {
437 *src= CharArray<nchar>::ToLower( *src );
438 ++src;
439 }
440}
442
443template<> inline int CharArray<nchar>::CompareIgnoreCase( const nchar* lhs, const nchar* rhs, integer cmpLength )
444{
445 #if defined (__GLIBCXX__) || defined(__APPLE__) || defined(__ANDROID_NDK__)
446 return ::strncasecmp( lhs, rhs, static_cast<size_t>(cmpLength) );
447 #elif defined ( _WIN32 )
448 return _strnicmp ( lhs, rhs, static_cast<size_t>(cmpLength) );
449 #else
450 #pragma message ( "Unknown Platform in file: " __FILE__ )
451 #endif
452}
453
454template<> inline integer CharArray<nchar>::IndexOfAnyIncludedZT ( const nchar* haystack, const nchar* needles )
455{
456 const nchar* result= std::strpbrk(haystack, needles);
457 return result ? result - haystack
458 : -1;
459}
460
461template<> inline integer CharArray<nchar>::IndexOfAnyExcludedZT( const nchar* haystack, const nchar* needles )
462{
463 return static_cast<integer>( std::strspn(haystack, needles) );
464}
465
466
467
473extern template ALIB_API void CharArray<nchar>::Reverse ( nchar*,integer );
474
475
476// #################################################################################################
477// Wide character specifics
478// #################################################################################################
479template<> inline wchar CharArray<wchar>::ToUpper(wchar c)
480{
481 return static_cast<wchar>(towupper(static_cast<wint_t>(c)));
482}
483
484template<> inline wchar CharArray<wchar>::ToLower(wchar c)
485{
486 return static_cast<wchar>(towlower(static_cast<wint_t>(c)));
487}
488
490template<> inline void CharArray<wchar>::ToUpper(wchar* src, integer length)
491{
492 wchar* end= src + length;
493 while( src != end )
494 {
495 *src= CharArray<wchar>::ToUpper( *src );
496 ++src;
497 }
498}
499
500template<> inline void CharArray<wchar>::ToLower(wchar* src, integer length)
501{
502 wchar* end= src + length;
503 while( src != end )
504 {
505 *src= CharArray<wchar>::ToLower( *src );
506 ++src;
507 }
508}
510
511#if ALIB_CHARACTERS_NATIVE_WCHAR
512template<> inline void CharArray<wchar>::Fill( wchar* dest, integer length, wchar c )
513{
514 wmemset( dest, c, static_cast<size_t>(length) );
515}
516
517template<> inline int CharArray<wchar>::CompareIgnoreCase( const wchar* lhs, const wchar* rhs, integer cmpLength )
518{
519 #if defined ( _WIN32 )
520 return _wcsnicmp ( lhs, rhs, static_cast<size_t>(cmpLength) );
521 #elif defined (__GLIBCXX__) || defined(__APPLE__) || defined(__ANDROID_NDK__)
522 return ::wcsncasecmp( lhs, rhs, static_cast<size_t>(cmpLength) );
523 #else
524 #pragma message ( "Unknown Platform in file: " __FILE__ )
525 #endif
526}
527
528template<> inline integer CharArray<wchar>::IndexOfAnyIncludedZT ( const wchar* haystack, const wchar* needles )
529{
530 const wchar* result= std::wcspbrk(haystack, needles);
531 return result ? result - haystack
532 : -1;
533}
534template<> inline integer CharArray<wchar>::IndexOfAnyExcludedZT( const wchar* haystack, const wchar* needles )
535{
536 return static_cast<integer>( std::wcsspn(haystack, needles) );
537}
538
539
540#else
541template<> ALIB_API void CharArray<wchar>::Fill( wchar* dest, integer length, wchar c );
542template<> ALIB_API int CharArray<wchar>::CompareIgnoreCase ( const wchar* lhs, const wchar* rhs, integer cmpLength );
543template<> ALIB_API integer CharArray<wchar>::IndexOfAnyIncludedZT( const wchar* haystack, const wchar* needles );
544template<> ALIB_API integer CharArray<wchar>::IndexOfAnyExcludedZT( const wchar* haystack, const wchar* needles );
545#endif
546
547
553extern template ALIB_API void CharArray<wchar>::Reverse ( wchar*,integer );
554
555
556
557// #################################################################################################
558// Strange character specifics
559// #################################################################################################
560template<> inline xchar CharArray<xchar>::ToUpper(xchar c)
561{
562 return static_cast<xchar>(towupper(static_cast<wint_t>(c)));
563}
564
565template<> inline xchar CharArray<xchar>::ToLower(xchar c)
566{
567 return static_cast<xchar>(towlower(static_cast<wint_t>(c)));
568}
569
571template<> inline void CharArray<xchar>::ToUpper(xchar* src, integer length)
572{
573 xchar* end= src + length;
574 while( src != end )
575 {
576 *src= CharArray<xchar>::ToUpper( *src );
577 ++src;
578 }
579}
580
581template<> inline void CharArray<xchar>::ToLower(xchar* src, integer length)
582{
583 xchar* end= src + length;
584 while( src != end )
585 {
586 *src= CharArray<xchar>::ToLower( *src );
587 ++src;
588 }
589}
591
592#if ALIB_CHARACTERS_NATIVE_WCHAR
593template<> ALIB_API void CharArray<xchar>::Fill( xchar* dest, integer length, xchar c );
594template<> ALIB_API int CharArray<xchar>::CompareIgnoreCase ( const xchar* lhs, const xchar* rhs, integer cmpLength );
595template<> ALIB_API integer CharArray<xchar>::IndexOfAnyIncludedZT( const xchar* haystack, const xchar* needles );
596template<> ALIB_API integer CharArray<xchar>::IndexOfAnyExcludedZT( const xchar* haystack, const xchar* needles );
597#else
598template<> inline void CharArray<xchar>::Fill( xchar* dest, integer length, xchar c )
599{
600 wmemset( dest, c, static_cast<size_t>(length) );
601}
602
603template<> inline int CharArray<xchar>::CompareIgnoreCase( const xchar* lhs, const xchar* rhs, integer cmpLength )
604{
605 #if defined (__GLIBCXX__) || defined(__APPLE__)
606 return ::wcsncasecmp( lhs, rhs, static_cast<size_t>(cmpLength) );
607 #elif defined ( _WIN32 )
608 return _wcsnicmp ( lhs, rhs, static_cast<size_t>(cmpLength) );
609 #else
610 #pragma message ( "Unknown Platform in file: " __FILE__ )
611 #endif
612}
613
614template<> inline integer CharArray<xchar>::IndexOfAnyIncludedZT ( const xchar* haystack, const xchar* needles )
615{
616 const xchar* result= std::wcspbrk(haystack, needles);
617 return result ? result - haystack
618 : -1;
619}
620template<> inline integer CharArray<xchar>::IndexOfAnyExcludedZT( const xchar* haystack, const xchar* needles )
621{
622 return static_cast<integer>( std::wcsspn(haystack, needles) );
623}
624
625#endif
626
627
633extern template ALIB_API void CharArray<xchar>::Reverse ( xchar*,integer );
634
635
636
637//! @endcond
638
639
640}} // namespace [alib::character]
641
642
643#endif // HPP_ALIB_CHARACTERS_CHARARRAY
#define ALIB_WARNINGS_RESTORE
Definition alib.hpp:715
#define ALIB_API
Definition alib.hpp:538
#define ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE
Definition alib.hpp:644
PLATFORM_SPECIFIC xchar
PLATFORM_SPECIFIC wchar
Definition alib.cpp:57
characters::nchar nchar
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
Definition integers.hpp:286
static TChar ToLower(TChar c)
static integer IndexOfFirstDifference(const TChar *haystack, integer haystackLength, const TChar *needle, integer needleLength, lang::Case sensitivity)
static integer LastIndexOfAnyExclude(const TChar *haystack, integer startIdx, const TChar *needles, integer needlesLength)
static ALIB_WARNINGS_RESTORE bool Equal(const TChar *lhs, const TChar *rhs, integer cmpLength)
static integer IndexOfAnyIncludedZT(const TChar *haystack, const TChar *needles)
static void ToUpper(TChar *src, integer length)
static TChar ToUpper(TChar c)
static integer IndexOfAnyExcludedZT(const TChar *haystack, const TChar *needles)
static integer Length(const TChar *cstring)
Definition chararray.hpp:96
static ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE void Reverse(TChar *src, integer length)
static int Compare(const TChar *lhs, const TChar *rhs, integer cmpLength)
static void ToLower(TChar *src, integer length)
static void Fill(TChar *dest, integer length, TChar value)
static integer IndexOfAnyExcluded(const TChar *haystack, integer haystackLength, const TChar *needles, integer needlesLength)
static int CompareIgnoreCase(const TChar *lhs, const TChar *rhs, integer cmpLength)
static void Copy(const TChar *src, integer length, TChar *dest)
static integer LastIndexOfAnyInclude(const TChar *haystack, integer startIdx, const TChar *needles, integer needlesLength)
static bool Equal(TChar lhs, TRhs rhs)
Definition chararray.hpp:67
static ALIB_WARNINGS_RESTORE const TChar * Search(const TChar *haystack, integer haystackLength, TChar needle)
static void Move(const TChar *src, integer length, TChar *dest)
static ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE integer IndexOfAnyIncluded(const TChar *haystack, integer haystackLength, const TChar *needles, integer needlesLength)