238 constexpr Character (
char16_t hiSurrogate,
char16_t lowSurrogate);
239 constexpr Character (
char32_t c)
noexcept;
240 constexpr Character (
wchar_t c)
noexcept (
sizeof (wchar_t) == 4);
250 nonvirtual
ASCII GetAsciiCode ()
const noexcept;
256 constexpr char32_t GetCharacterCode ()
const noexcept;
262 explicit constexpr operator char32_t ()
const noexcept;
271 template <
typename T>
272 constexpr T As ()
const noexcept
273 requires (same_as<T, char32_t> or (
sizeof (
wchar_t) ==
sizeof (
char32_t) and same_as<T, wchar_t>));
274 template <IUNICODECodePo
int T>
278 template <IUNICODECodePo
int T>
289 constexpr bool IsASCII ()
const noexcept;
290 template <IPossibleCharacterRepresentation CHAR_T>
291 static constexpr bool IsASCII (CHAR_T c)
noexcept;
292 template <IPossibleCharacterRepresentation CHAR_T>
293 static constexpr bool IsASCII (span<const CHAR_T> s)
noexcept;
299 template <IPossibleCharacterRepresentation CHAR_T>
300 static constexpr void CheckASCII (span<const CHAR_T> s);
301 template <IPossibleCharacterRepresentation CHAR_T>
302 static constexpr void CheckASCII (span<CHAR_T> s);
319 constexpr bool IsLatin1 ()
const noexcept;
320 template <IUNICODECanUnambiguouslyConvertFrom CHAR_T>
321 static constexpr bool IsLatin1 (span<const CHAR_T> s)
noexcept;
343 template <IUNICODECanUnambiguouslyConvertFrom CHAR_T>
350 template <IUNICODECanUnambiguouslyConvertFrom CHAR_T>
351 static void CheckLatin1 (span<const CHAR_T> s);
352 template <IUNICODECanUnambiguouslyConvertFrom CHAR_T>
353 static void CheckLatin1 (span<CHAR_T> s);
371 constexpr bool IsWhitespace () const noexcept;
372 static constexpr
bool IsWhitespace (
Character c) noexcept;
375 nonvirtual
bool IsDigit () const noexcept;
378 nonvirtual
bool IsHexDigit () const noexcept;
381 nonvirtual
bool IsAlphabetic () const noexcept;
388 nonvirtual
bool IsUpperCase () const noexcept;
395 nonvirtual
bool IsLowerCase () const noexcept;
400 nonvirtual
bool IsAlphaNumeric () const noexcept;
405 nonvirtual
bool IsPunctuation () const noexcept;
414 constexpr
bool IsControl () const noexcept;
433 nonvirtual
Character ToLowerCase () const noexcept;
446 nonvirtual
Character ToUpperCase () const noexcept;
460 template <typename RESULT_T =
string, IPossibleCharacterRepresentation CHAR_T>
461 static
bool AsASCIIQuietly (span<const CHAR_T> fromS, RESULT_T* into)
462 requires requires (RESULT_T* into) {
463 { into->empty () } -> same_as<bool>;
464 { into->push_back (
ASCII{0}) };
473 static constexpr char16_t kUNICODESurrogate_High_Start{0xD800};
474 static constexpr char16_t kUNICODESurrogate_High_End{0xDBFF};
475 static constexpr char16_t kUNICODESurrogate_Low_Start{0xDC00};
476 static constexpr char16_t kUNICODESurrogate_Low_End{0xDFFF};
483 constexpr bool IsSurrogatePair ()
const;
484 static constexpr bool IsSurrogatePair (
char16_t hiSurrogate,
char16_t lowSurrogate);
485 static constexpr bool IsSurrogatePair_Hi (
char16_t hiSurrogate);
486 static constexpr bool IsSurrogatePair_Lo (
char16_t lowSurrogate);
493 constexpr pair<char16_t, char16_t> GetSurrogatePair ()
const;
498 constexpr bool operator== (
const Character&)
const noexcept =
default;
503 constexpr strong_ordering operator<=> (
const Character&)
const noexcept =
default;
506 struct EqualsComparer;
509 struct ThreeWayComparer;
517 template <IUNICODECanUnambiguouslyConvertFrom CHAR_T,
size_t E1,
size_t E2>
518 static constexpr strong_ordering Compare (span<const CHAR_T, E1> lhs, span<const CHAR_T, E2> rhs, CompareOptions co)
noexcept;
521 [[deprecated (
"Since Stroika 3.0d1, use span based Compare")]]
static strong_ordering
522 Compare (
const Character* lhsStart,
const Character* lhsEnd,
const Character* rhsStart,
const Character* rhsEnd, CompareOptions co)
noexcept
524 return Compare (span{lhsStart, lhsEnd}, span{rhsStart, rhsEnd}, co);
528 char32_t fCharacterCode_;