Top Description Constructors Methods
com.ibm.icu.lang

public Class CharSequences

extends Object
Class Inheritance
Annotations
@Deprecated

Deprecated

This API is ICU internal only.

A number of utilities for dealing with CharSequences and related classes. For accessing codepoints with a CharSequence, also see
Author
markdavis
ICU Status
Internal ICU component.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
codePointLength(CharSequence s)

Deprecated This API is ICU internal only.
Count the code point length.
public static int[]
codePoints(CharSequence s)

Deprecated This API is ICU internal only.
Utility function for simplified, more robust loops, such as:
  for (int codePoint : CharSequences.codePoints(string)) {
    doSomethingWith(codePoint);
  }
public static int
compare(CharSequence string, int codePoint)

Deprecated This API is ICU internal only.
Utility to compare a string to a code point.
public static int
compare(int codepoint, CharSequence a)

Deprecated This API is ICU internal only.
Utility to compare a string to a code point.
public static int
compare(CharSequence a, CharSequence b)

Deprecated This API is ICU internal only.
Utility for comparing the contents of CharSequences
public static final boolean
equals(int codepoint, CharSequence other)

Deprecated This API is ICU internal only.
Utility function for comparing codepoint to string without generating new string.
public static final boolean
equals(CharSequence other, int codepoint)

Deprecated This API is ICU internal only.
public static final <T> boolean
equals(T a, T b)

Deprecated This API is ICU internal only.
Utility function for comparing objects that may be null string.
public static boolean
equalsChars(CharSequence a, CharSequence b)

Deprecated This API is ICU internal only.
Utility for comparing the contents of CharSequences
public static int
getSingleCodePoint(CharSequence s)

Deprecated This API is ICU internal only.
Return the value of the first code point, if the string is exactly one code point.
public static int
indexOf(CharSequence s, int codePoint)

Deprecated This API is ICU internal only.
Find code point in string.
public static int
matchAfter(CharSequence a, CharSequence b, int aIndex, int bIndex)

Deprecated This API is ICU internal only.
Find the longest n such that a[aIndex,n] = b[bIndex,n], and n is on a character boundary.
public static boolean
onCharacterBoundary(CharSequence s, int i)

Deprecated This API is ICU internal only.
Are we on a character boundary?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CharSequencesback to summary
private CharSequences()

Method Detail

codePointLengthback to summary
public int codePointLength(CharSequence s)

Deprecated

This API is ICU internal only.

Count the code point length. Unpaired surrogates count as 1.

Annotations
@Deprecated
ICU Status
Internal ICU component.
codePointsback to summary
public static int[] codePoints(CharSequence s)

Deprecated

This API is ICU internal only.

Utility function for simplified, more robust loops, such as:

  for (int codePoint : CharSequences.codePoints(string)) {
    doSomethingWith(codePoint);
  }
Annotations
@Deprecated
ICU Status
Internal ICU component.
compareback to summary
public static int compare(CharSequence string, int codePoint)

Deprecated

This API is ICU internal only.

Utility to compare a string to a code point. Same results as turning the code point into a string (with the [ugly] new StringBuilder().appendCodePoint(codepoint).toString()) and comparing, but much faster (no object creation). Actually, there is one difference; a null compares as less. Note that this (=String) order is UTF-16 order -- not code point order.

Annotations
@Deprecated
ICU Status
Internal ICU component.
compareback to summary
public static int compare(int codepoint, CharSequence a)

Deprecated

This API is ICU internal only.

Utility to compare a string to a code point. Same results as turning the code point into a string and comparing, but much faster (no object creation). Actually, there is one difference; a null compares as less. Note that this (=String) order is UTF-16 order -- not code point order.

Annotations
@Deprecated
ICU Status
Internal ICU component.
compareback to summary
public static int compare(CharSequence a, CharSequence b)

Deprecated

This API is ICU internal only.

Utility for comparing the contents of CharSequences

Annotations
@Deprecated
ICU Status
Internal ICU component.
equalsback to summary
public static final boolean equals(int codepoint, CharSequence other)

Deprecated

This API is ICU internal only.

Utility function for comparing codepoint to string without generating new string.

Annotations
@Deprecated
ICU Status
Internal ICU component.
equalsback to summary
public static final boolean equals(CharSequence other, int codepoint)

Deprecated

This API is ICU internal only.

Annotations
@Deprecated
ICU Status
Internal ICU component.
equalsback to summary
public static final <T> boolean equals(T a, T b)

Deprecated

This API is ICU internal only.

Utility function for comparing objects that may be null string.

Annotations
@Deprecated
ICU Status
Internal ICU component.
equalsCharsback to summary
public static boolean equalsChars(CharSequence a, CharSequence b)

Deprecated

This API is ICU internal only.

Utility for comparing the contents of CharSequences

Annotations
@Deprecated
ICU Status
Internal ICU component.
getSingleCodePointback to summary
public static int getSingleCodePoint(CharSequence s)

Deprecated

This API is ICU internal only.

Return the value of the first code point, if the string is exactly one code point. Otherwise return Integer.MAX_VALUE.

Annotations
@Deprecated
ICU Status
Internal ICU component.
indexOfback to summary
public static int indexOf(CharSequence s, int codePoint)

Deprecated

This API is ICU internal only.

Find code point in string.

Annotations
@Deprecated
ICU Status
Internal ICU component.
matchAfterback to summary
public static int matchAfter(CharSequence a, CharSequence b, int aIndex, int bIndex)

Deprecated

This API is ICU internal only.

Find the longest n such that a[aIndex,n] = b[bIndex,n], and n is on a character boundary.

Annotations
@Deprecated
ICU Status
Internal ICU component.
onCharacterBoundaryback to summary
public static boolean onCharacterBoundary(CharSequence s, int i)

Deprecated

This API is ICU internal only.

Are we on a character boundary?

Annotations
@Deprecated
ICU Status
Internal ICU component.