Interface StringUtils


public interface StringUtils
String Utilities used for Java SE-ME compatibility.
Author:
Cèsar Ordiñana
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compare(String source, String target, boolean localized)
    Compares two Strings, maybe taking into account the current locale.
    replaceAll(String input, String regex, String replacement)
    Compatible implementation of the String.replaceAll(regexp, replacement) method.
    replaceFirst(String input, String regex, String replacement)
    Compatible implementation of the String.replaceFirst(regexp, replacement) method.
    split(String input, String regex)
    Compatible implementation of the String.split(regexp) method.
    split(String input, String regex, int limit)
    Compatible implementation of the String.split(regexp, limit) method.
  • Method Details

    • split

      String[] split(String input, String regex)
      Compatible implementation of the String.split(regexp) method.
      See Also:
    • split

      String[] split(String input, String regex, int limit)
      Compatible implementation of the String.split(regexp, limit) method.
      See Also:
    • replaceAll

      String replaceAll(String input, String regex, String replacement)
      Compatible implementation of the String.replaceAll(regexp, replacement) method.
      See Also:
    • replaceFirst

      String replaceFirst(String input, String regex, String replacement)
      Compatible implementation of the String.replaceFirst(regexp, replacement) method.
      See Also:
    • compare

      int compare(String source, String target, boolean localized)
      Compares two Strings, maybe taking into account the current locale.
      Parameters:
      source - the source text
      target - the target text to compare to
      localized - if the comparison must be made with the current locale (ex: if making a difference between accented characters or not).
      Returns:
      Returns an integer value. Value is less than zero if source is less than target, value is zero if source and target are equal, value is greater than zero if source is greater than target.