You.i Engine
YiStringICU.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_STRING_ICU_H_
3 #define _YI_STRING_ICU_H_
4 
5 #include "utility/YiString.h"
6 
7 #include <unicode/unistr.h>
8 
22 {
23 public:
29  static CYIString ToCYIString(const U_NAMESPACE_QUALIFIER UnicodeString &s, size_t sizeHintBytes = 0);
30 
34  static U_NAMESPACE_QUALIFIER UnicodeString ToUnicodeString(CYIStringView value);
35 
43  static CYIString ToNormalizedText(CYIStringView text, bool *pError = nullptr);
44 
50  static CYIString ToUpper(CYIStringView value);
51 
57  static CYIString ToLower(CYIStringView value);
58 
62  static bool ContainsCaseInsensitive(CYIStringView value, CYIStringView substring);
63 
69  static bool StartsWithCaseInsensitive(CYIStringView value, CYIStringView prefix);
70 
76  static bool EndsWithCaseInsensitive(CYIStringView value, CYIStringView suffix);
77 
81  static int32_t CompareCaseInsensitive(CYIStringView first, CYIStringView second);
82 
88  static bool EqualsCaseInsensitive(CYIStringView first, CYIStringView second);
89 
90 private:
91  CYIStringICU() = delete;
92 };
93 
96 #endif
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:36
static CYIString ToUpper(CYIStringView value)
static bool EqualsCaseInsensitive(CYIStringView first, CYIStringView second)
static int32_t CompareCaseInsensitive(CYIStringView first, CYIStringView second)
static U_NAMESPACE_QUALIFIER UnicodeString ToUnicodeString(CYIStringView value)
static CYIString ToCYIString(const U_NAMESPACE_QUALIFIER UnicodeString &s, size_t sizeHintBytes=0)
static CYIString ToNormalizedText(CYIStringView text, bool *pError=nullptr)
static bool ContainsCaseInsensitive(CYIStringView value, CYIStringView substring)
static bool EndsWithCaseInsensitive(CYIStringView value, CYIStringView suffix)
static CYIString ToLower(CYIStringView value)
static bool StartsWithCaseInsensitive(CYIStringView value, CYIStringView prefix)
A container class for functions that require the ICU library.
Definition: YiStringICU.h:21
A lightweight wrapper around a sequence of Unicode characters.
Definition: YiStringView.h:57