AndroidCharacter
Stay organized with collections
Save and categorize content based on your preferences.
open classAndroidCharacter
AndroidCharacter exposes some character properties that used to be not easily accessed from java.lang.Character, but are now available in ICU.
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
open static Unit |
getDirectionalities(src: CharArray!, dest: ByteArray!, count: Int) Fill in the first |
open static Int |
getEastAsianWidth(input: Char) Calculate the East Asian Width of a character according to Unicode TR#11. |
open static Unit |
getEastAsianWidths(src: CharArray!, start: Int, count: Int, dest: ByteArray!) Fill the first |
open static Char |
Return the right-to-left mirror (or the original char if none) of the specified char. |
open static Boolean |
Replace the specified slice of |
Constants
EAST_ASIAN_WIDTH_AMBIGUOUS
static valEAST_ASIAN_WIDTH_AMBIGUOUS: Int
Deprecated: Deprecated in Java.
Value: 1
EAST_ASIAN_WIDTH_FULL_WIDTH
static valEAST_ASIAN_WIDTH_FULL_WIDTH: Int
Deprecated: Deprecated in Java.
Value: 3
EAST_ASIAN_WIDTH_HALF_WIDTH
static valEAST_ASIAN_WIDTH_HALF_WIDTH: Int
Deprecated: Deprecated in Java.
Value: 2
EAST_ASIAN_WIDTH_NARROW
static valEAST_ASIAN_WIDTH_NARROW: Int
Deprecated: Deprecated in Java.
Value: 4
EAST_ASIAN_WIDTH_NEUTRAL
static valEAST_ASIAN_WIDTH_NEUTRAL: Int
Deprecated: Deprecated in Java.
Value: 0
EAST_ASIAN_WIDTH_WIDE
static valEAST_ASIAN_WIDTH_WIDE: Int
Deprecated: Deprecated in Java.
Value: 5
Public constructors
AndroidCharacter
AndroidCharacter()
Public methods
getDirectionalities
open static fungetDirectionalities(
src: CharArray!,
dest: ByteArray!,
count: Int
): Unit
Deprecated: Deprecated in Java.
Fill in the first count
bytes of dest
with the directionalities from the first count
chars of src
. This is just like Character.getDirectionality() except it is a batch operation.
getEastAsianWidth
open static fungetEastAsianWidth(input: Char): Int
Deprecated: Deprecated in Java.
Calculate the East Asian Width of a character according to Unicode TR#11. The return will be one of EAST_ASIAN_WIDTH_NEUTRAL
, EAST_ASIAN_WIDTH_AMBIGUOUS
, EAST_ASIAN_WIDTH_HALF_WIDTH
, EAST_ASIAN_WIDTH_FULL_WIDTH
, EAST_ASIAN_WIDTH_NARROW
, or EAST_ASIAN_WIDTH_WIDE
.
Parameters | |
---|---|
input |
Char: the character to measure |
Return | |
---|---|
Int |
the East Asian Width for input |
getEastAsianWidths
open static fungetEastAsianWidths(
src: CharArray!,
start: Int,
count: Int,
dest: ByteArray!
): Unit
Deprecated: Deprecated in Java.
Fill the first count
bytes of dest
with the East Asian Width from count
chars of src
starting at start
. East Asian Width is calculated based on Unicode TR#11. Each entry in dest
will be one of EAST_ASIAN_WIDTH_NEUTRAL
, EAST_ASIAN_WIDTH_AMBIGUOUS
, EAST_ASIAN_WIDTH_HALF_WIDTH
, EAST_ASIAN_WIDTH_FULL_WIDTH
, EAST_ASIAN_WIDTH_NARROW
, or EAST_ASIAN_WIDTH_WIDE
.
getMirror
open static fungetMirror(ch: Char): Char
Deprecated: Deprecated in Java.
Return the right-to-left mirror (or the original char if none) of the specified char.
mirror
open static funmirror(
text: CharArray!,
start: Int,
count: Int
): Boolean
Deprecated: Deprecated in Java.
Replace the specified slice of text
with the chars' right-to-left mirrors (if any), returning true if any replacements were made.
Parameters | |
---|---|
text |
CharArray!: array of characters to apply mirror operation |
start |
Int: first character in array to mirror |
count |
Int: maximum number of characters to mirror |
Return | |
---|---|
Boolean |
true if replacements were made |