This class represents a single Unicode character.
It can be converted to and from char
or wchar_t
and implements commonly used character operations.
Returns |
|
Returns Unicode code point value of the character. |
|
Returns the high surrogate code unit for the supplementary character. |
|
Returns |
|
Returns |
|
Returns |
|
Returns the low surrogate code unit for the supplementary character. |
See |
Possible constructors:
UniChar(c : int) -> None
UniChar(c : int) -> None
This class represents a single Unicode character.
__init__ (self, c : int)
c (long)
None
__init__ (self, c : int)
c (long)
None
Returns True
if the character is representable as a single byte in the current locale encoding.
This function only returns True
if the character can be converted in exactly one byte, e.g. it only returns True
for 7 bit ASCII
characters when the encoding used is UTF-8
.
It is mostly useful to test if the character can be passed to functions taking a int and is used by wxWidgets itself for this purpose.
c (int) – An output pointer to the value of this Unicode character as a char
. Must be not None
.
bool
True
if the object is an 8 bit int and c was filled with its value as int or False
otherwise (c won’t be modified then).
Added in version 2.9.1.
See also
Returns Unicode code point value of the character.
value_type
HighSurrogate (self)
Returns the high surrogate code unit for the supplementary character.
wx.Uint16
Added in version 4.1/wxWidgets-3.1.1.
HighSurrogate (value : Uint32)
Returns the high surrogate code unit for the supplementary character.
value (wx.int) – The Unicode code point of the character.
wx.Uint16
Added in version 4.1/wxWidgets-3.1.1.
Returns True
if the character is an ASCII
character (i.e. if its value is less than 128).
bool
IsBMP (self)
Returns True
if the character is a BMP
character (i.e. if its value is less than 0x10000).
bool
Added in version 4.1/wxWidgets-3.1.1.
IsBMP (value : Uint32)
Returns True
if the character is a BMP
character (i.e. if its value is less than 0x10000).
value (wx.int) – The Unicode code point of the character.
bool
Added in version 4.1/wxWidgets-3.1.1.
IsSupplementary (self)
Returns True
if the character is a supplementary character (i.e. between 0x10000 and 0x10FFFF).
bool
Added in version 4.1/wxWidgets-3.1.1.
IsSupplementary (value : Uint32)
Returns True
if the character is a supplementary character (i.e. between 0x10000 and 0x10FFFF).
value (wx.int) – The Unicode code point of the character.
bool
Added in version 4.1/wxWidgets-3.1.1.
LowSurrogate (self)
Returns the low surrogate code unit for the supplementary character.
wx.Uint16
Added in version 4.1/wxWidgets-3.1.1.
LowSurrogate (value : Uint32)
Returns the low surrogate code unit for the supplementary character.
value (wx.int) – The Unicode code point of the character.
wx.Uint16
Added in version 4.1/wxWidgets-3.1.1.