UnicodeUtils Class Reference 系统

#include <unicodeutils.h>

详细描述

This class handles unicode decompositions and correct string comparison using decomposition informations.

Public Types

using  DecompositionArray = BaseArray < Utf32Char , 1, BASEARRAYFLAGS::MOVEANDCOPYOBJECTS , FixedBufferAllocator < Utf32Char , 8, DefaultAllocator > >
using  DecompositionHfsArray = BaseArray < Utf16Char , 1, BASEARRAYFLAGS::MOVEANDCOPYOBJECTS , FixedBufferAllocator < Utf16Char , 8, DefaultAllocator > >

静态公共成员函数

static MAXON_METHOD Result < String DecomposeStringHfs (const String &str)
static MAXON_METHOD Result < String DecomposeString (const String &str)
static MAXON_METHOD String   GetUnicodeVersion ()
static MAXON_METHOD Result < String NormalizeString ( NORMALIZATION form, const String &str)
static MAXON_METHOD Bool   UniCharDecomposition ( Utf32Char chr, DecompositionArray &res_decomp)
static MAXON_METHOD Bool   UniCharHfsDecomposition ( Utf16Char chr, DecompositionHfsArray &res_decomp)
static MAXON_METHOD COMPARERESULT   UniCodeCompare ( Utf32Char a, Utf32Char b)
static MAXON_METHOD CHARACTERTYPE   GetCharacterType ( Utf32Char chr)
static MAXON_METHOD Utf32Char   UpperCase ( Utf32Char chr)
static MAXON_METHOD Utf32Char   TitleCase ( Utf32Char chr)
static MAXON_METHOD Utf32Char   LowerCase ( Utf32Char chr)

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL ( UnicodeUtils , MAXON_REFERENCE_NONE , "net.maxon.interface.unicodeutils")

Member Typedef Documentation

◆  DecompositionArray

using DecompositionArray = BaseArray < Utf32Char , 1, BASEARRAYFLAGS::MOVEANDCOPYOBJECTS , FixedBufferAllocator < Utf32Char , 8, DefaultAllocator > >

Decomposed representation of a unicode character.

◆  DecompositionHfsArray

using DecompositionHfsArray = BaseArray < Utf16Char , 1, BASEARRAYFLAGS::MOVEANDCOPYOBJECTS , FixedBufferAllocator < Utf16Char , 8, DefaultAllocator > >

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( UnicodeUtils   ,
MAXON_REFERENCE_NONE   ,
"net.maxon.interface.unicodeutils"   
)
private

◆  DecomposeStringHfs()

static MAXON_METHOD Result < String > DecomposeStringHfs ( const String str )
static

Normalize a string to HFS+ decomposition.

◆  DecomposeString()

static MAXON_METHOD Result < String > DecomposeString ( const String str )
static

Normalize a string to HFS+ decomposition.

◆  GetUnicodeVersion()

static MAXON_METHOD String GetUnicodeVersion ( )
static

Returns the version of Unicode database used internally.

返回
The version, e.g: String ("8.0.0")

◆  NormalizeString()

static MAXON_METHOD Result < String > NormalizeString ( NORMALIZATION   form ,
const String str  
)
static

Normalize a string.

◆  UniCharDecomposition()

static MAXON_METHOD Bool UniCharDecomposition ( Utf32Char   chr ,
DecompositionArray res_decomp  
)
static

Breaks a unicode character into the decomposited properties. This is e.g. useful for sorting algorithms. A german 'A' umlaut will be decomposed to 'A' and '..'

参数
[in] chr Unicode character to be decomposited.
[out] res_decomp Array with the decomposited character elements.
返回
True if the operation was successful.

◆  UniCharHfsDecomposition()

static MAXON_METHOD Bool UniCharHfsDecomposition ( Utf16Char   chr ,
DecompositionHfsArray res_decomp  
)
static

Breaks a unicode character into the decomposited properties. This is e.g. useful for sorting algorithms. A german 'A' umlaut will be decomposed to 'A' and '..'

参数
[in] chr Unicode character to be decomposited.
[out] res_decomp Array with the decomposited character elements.
返回
True if the operation was successful.

◆  UniCodeCompare()

static MAXON_METHOD COMPARERESULT UniCodeCompare ( Utf32Char   a ,
Utf32Char   b  
)
static

Compares two unicode characters. this function uses the decomposition properties to do advanced unicode sorting.

另请参阅
UniCharDecomposition() .
参数
[in] a First character to compare.
[in] b Second character to compare.
返回
COMPARERESULT of the operation.

◆  GetCharacterType()

static MAXON_METHOD CHARACTERTYPE GetCharacterType ( Utf32Char   chr )
static

Returns the type of a given unicode char. This can be used to determine if a character is a letter, number or symbol

参数
[in] chr Character to find.
返回
CHARACTERTYPE of the character.

◆  UpperCase()

static MAXON_METHOD Utf32Char UpperCase ( Utf32Char   chr )
static

Returns the uppercase of a given unicode char.

参数
[in] chr Character to convert to uppercase.
返回
Uppercase character of chr.

◆  TitleCase()

static MAXON_METHOD Utf32Char TitleCase ( Utf32Char   chr )
static

Returns the titlecase version of a given unicode char.

参数
[in] chr Character to convert to titlecase.
返回
Titlecase character of chr.

◆  LowerCase()

static MAXON_METHOD Utf32Char LowerCase ( Utf32Char   chr )
static

Returns the lowercase version of a given unicode char.

参数
[in] chr Character to convert to lowercase.
返回
Lowercase character of chr.