Class CharSequences

java.lang.Object
com.android.utils.CharSequences

public class CharSequences
extends java.lang.Object
A number of utility methods around CharSequence handling, which adds methods that are available on Strings (such as indexOf, startsWith and regionMatches and provides equivalent methods for character sequences.

NOTE: This is not a public or final API; if you rely on this be prepared to adjust your code for the next tools release.

  • Constructor Summary

    Constructors 
    Constructor Description
    CharSequences()  
  • Method Summary

    Modifier and Type Method Description
    static int indexOfIgnoreCase​(java.lang.CharSequence where, java.lang.CharSequence what, int fromIndex)
    Similar to String.indexOf(int, int) but with case insensitive comparison.
    static char toLowerCase​(char c)
    Converts a character to lower case.
    static char toUpperCase​(char c)
    Converts a character to upper case.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • indexOfIgnoreCase

      public static int indexOfIgnoreCase​(java.lang.CharSequence where, java.lang.CharSequence what, int fromIndex)
      Similar to String.indexOf(int, int) but with case insensitive comparison.
    • toUpperCase

      public static char toUpperCase​(char c)
      Converts a character to upper case. A slightly optimized version of Character.toUpperCase(char).
    • toLowerCase

      public static char toLowerCase​(char c)
      Converts a character to lower case. A slightly optimized version of Character.toLowerCase(char).