Class CharSequences

java.lang.Object
com.ibm.icu.lang.CharSequences

@Deprecated public class CharSequences extends Object
Deprecated.
This API is ICU internal only.
Author:
markdavis
Status:
Internal. This API is ICU internal only.
  • Method Details

    • matchAfter

      @Deprecated 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.
      Status:
      Internal. This API is ICU internal only.
    • codePointLength

      @Deprecated public int codePointLength(CharSequence s)
      Deprecated.
      This API is ICU internal only.
      Count the code point length. Unpaired surrogates count as 1.
      Status:
      Internal. This API is ICU internal only.
    • equals

      @Deprecated 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.
      Status:
      Internal. This API is ICU internal only.
    • equals

      @Deprecated public static final boolean equals(CharSequence other, int codepoint)
      Deprecated.
      This API is ICU internal only.
      Status:
      Internal. This API is ICU internal only.
    • compare

      @Deprecated 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.
      Status:
      Internal. This API is ICU internal only.
    • compare

      @Deprecated 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.
      Status:
      Internal. This API is ICU internal only.
    • getSingleCodePoint

      @Deprecated 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.
      Status:
      Internal. This API is ICU internal only.
    • equals

      @Deprecated 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.
      Status:
      Internal. This API is ICU internal only.
    • compare

      @Deprecated public static int compare(CharSequence a, CharSequence b)
      Deprecated.
      This API is ICU internal only.
      Utility for comparing the contents of CharSequences
      Status:
      Internal. This API is ICU internal only.
    • equalsChars

      @Deprecated public static boolean equalsChars(CharSequence a, CharSequence b)
      Deprecated.
      This API is ICU internal only.
      Utility for comparing the contents of CharSequences
      Status:
      Internal. This API is ICU internal only.
    • onCharacterBoundary

      @Deprecated public static boolean onCharacterBoundary(CharSequence s, int i)
      Deprecated.
      This API is ICU internal only.
      Are we on a character boundary?
      Status:
      Internal. This API is ICU internal only.
    • indexOf

      @Deprecated public static int indexOf(CharSequence s, int codePoint)
      Deprecated.
      This API is ICU internal only.
      Find code point in string.
      Status:
      Internal. This API is ICU internal only.
    • codePoints

      @Deprecated 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);
        }
      
      Status:
      Internal. This API is ICU internal only.