org.eclipse.jgit.util
Class StringUtils

java.lang.Object
  extended by org.eclipse.jgit.util.StringUtils

public final class StringUtils
extends java.lang.Object

Miscellaneous string comparison utility methods.


Method Summary
static boolean equalsIgnoreCase(java.lang.String a, java.lang.String b)
          Test if two strings are equal, ignoring case.
static char toLowerCase(char c)
          Convert the input to lowercase.
static java.lang.String toLowerCase(java.lang.String in)
          Convert the input string to lower case, according to the "C" locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toLowerCase

public static char toLowerCase(char c)
Convert the input to lowercase.

This method does not honor the JVM locale, but instead always behaves as though it is in the US-ASCII locale. Only characters in the range 'A' through 'Z' are converted. All other characters are left as-is, even if they otherwise would have a lowercase character equivilant.

Parameters:
c - the input character.
Returns:
lowercase version of the input.

toLowerCase

public static java.lang.String toLowerCase(java.lang.String in)
Convert the input string to lower case, according to the "C" locale.

This method does not honor the JVM locale, but instead always behaves as though it is in the US-ASCII locale. Only characters in the range 'A' through 'Z' are converted, all other characters are left as-is, even if they otherwise would have a lowercase character equivilant.

Parameters:
in - the input string. Must not be null.
Returns:
a copy of the input string, after converting characters in the range 'A'..'Z' to 'a'..'z'.

equalsIgnoreCase

public static boolean equalsIgnoreCase(java.lang.String a,
                                       java.lang.String b)
Test if two strings are equal, ignoring case.

This method does not honor the JVM locale, but instead always behaves as though it is in the US-ASCII locale.

Parameters:
a - first string to compare.
b - second string to compare.
Returns:
true if a equals b