java 中字符、字符串的
常用方法 2008 年 05 月 08 日 星期四 02:28 char 的所有方法: static int charCount(int codePoint) 确定表示指定字符(Unicode 代码点)所需的 char 值的数量。 char charValue() 返回此 Character 对象的值。 static int codePointAt(char[] a, int index) 返回 char 数组的给定索引上的代码点。 static int codePointAt(char[] a, int index, int limit) 返回 char 数组的给定索引上的代码点,该数组中只有那些具有小于 limit 的 index 值的数组元素可以使用。 static int codePointAt(CharSequence seq, int index) 返回 CharSequence 的给定索引上的代码点。 static int codePointBefore(char[] a, int index) 返回 char 数组的给定索引前面的代码点。 static int codePointBefore(char[] a, int index, int start) 返回 char 数组的给定索引前面的代码点,该数组中只有那些具有大于等于 start 的 index 值的数组元素可以使用。 static int codePointBefore(CharSequence seq, int index) 返回 CharSequence 的给定索引前面的代码点。 static int codePointCount(char[] a, int offset, int count) 返回 char 数组参数的子数组中 Unicode 代码点的数量。 static int codePointCount(CharSequence seq, int beginIndex, int endIndex) 返回指定字符序列的文本范围内的 Unicode 代码点数量。 int compareTo(Character anotherCharacter) 根据数字比较两个 Character 对象。 static int digit(char ch, int radix) 返回使用指定基数的字符 ch 的数值。 static int digit(int codePoint, int radix) 返回使用指定基数的指定字符(Unicode 代码点)的数值。 boolean equals(Object obj) 将此对象与指定对象比较。 static char forDigit(int digit, int radix) 确定使用指定基数的特定数字的字符表示形式。 static byte getDirectionality(char ch) 返回给定字符的 Unicode 方向属性。 static byte getDirectionality(int codePoint) 返回给定字符(Unicode 代码点)的 Unicode 方向属性。 static int getNumericValue(char ch) 返回指定的 Unicode 字符表示的 int 值。 static int getNumericValue(int codePoint) 返回指定字符(Unicode 代码点)表示的 int 值。
static int getType(char ch) 返回一个指示字符的常规类别的值。 static int getType(int codePoint) 返回一个指示字符的常规类别的值。 int hashCode() 返回此 Character 的哈希码。 static boolean isDefined(char ch) 确定字符是否被定义为 Unicode 中的字符。 static boolean isDefined(int codePoint) 确定字符(Unicode 代码点)是否被定义为 Unicode 中的字符。 static boolean isDigit(char ch) 确定指定字符是否为数字。 static boolean isDigit(int codePoint) 确定指定字符(Unicode 代码点)是否为数字。 static boolean isHighSurrogate(char ch) 确定给出的 char 值是否为一个高代理项代码单元(也称为前导代理项代码单 元)。 static boolean isIdentifierIgnorable(char ch)
确定是否应该认为指定字符是 Java 标识符或 Unicode 标识符中可忽略的一个 字符。 static boolean isIdentifierIgnorable(int codePoint) 确定是否应该认为指定字符(Unicode 代码点)是 Java 标识符或 Unicode 标 识符中可忽略的一个字符。 static boolean isISOControl(char ch) 确定指定字符是否为 ISO 控制字符。 static boolean isISOControl(int codePoint) 确定引用的字符(Unicode 代码点)是否为 ISO 控制字符。 static boolean isJavaIdentifierPart(char ch) 确定指定字符是否可以是 Java 标识符中首字符以外的部分。 static boolean isJavaIdentifierPart(int codePoint) 确定字符(Unicode 代码点)是否可以是 Java 标识符中首字符以外的部分。 static boolean isJavaIdentifierStart(char ch) 确定是否允许将指定字符作