compareObjectToStringIgnoreCase

This method invokes Object.toString() on both provided objects, and
then compares the two return values for equality. No attempt is
currently made to pay attention to ASCII ordering. A null object sorts
before a non-null object.

Parameters:

o1 - First object to compare.

o2 - Second object to compare.

Returns:

Value less than zero if first object's string form sorts before second;
zero if both string forms are equal; value greater than zero if first
object's string form sorts after second.

compareToIgnoreCase

This function converts each character of s1 to upper case and each character of s2 to upper case, in the context of the specified locale,
and compares the converted characters one by one. It is assumed that conversion of 1 charcater to the upper case will
result in 1 upper case(if exists) character.

Parameters:

s1 - First string to compare.

s2 - Second string to compare.

Returns:

Value less than zero if first string sorts before the second;
zero if the two strings are the same; value greater than zero if the
first string sorts after the second.

compareToIgnoreCase

This function converts each character of s1 to upper case and each character of s2 to upper case, in the context of the specified locale,
and compares the converted characters one by one. It is assumed that conversion of 1 charcater to the upper case will
result in 1 upper case(if exists) character.

Parameters:

s1 - First string to compare.

s2 - Second string to compare.

locale - The locale code to use for the conversion.

Returns:

Value less than zero if first string sorts before the second;
zero if the two strings are the same; value greater than zero if the
first string sorts after the second.

compareToOutlookOrder

Compare two strings, ignoring case and handling special characters the same way as Outlook.

This function converts each character of s1 to upper case and each character of s2 to upper case, in the context of the specified locale,
and compares the converted characters one by one. It is assumed that conversion of 1 charcater to the upper case will
result in 1 upper case(if exists) character. It handles special characters the same wasy as Outlook (not strictly ASCII order)

Parameters:

s1 - First string to compare.

s2 - Second string to compare.

Returns:

Value less than zero if first string sorts before the second;
zero if the two strings are the same; value greater than zero if the
first string sorts after the second.

convertToOriginal

Converts the string buffer content (characters) to the first characters in a decomposition.
First character in a decomposition is the base character after stripping accents, but does not fold case.
If the character is an accent it is returned unchanged.
For more information on folding/decompistion see Draft Unicode Technical Report #30: Character Foldings.

Examples:
character U+00E9 will be replaced with U+0065;
character U+1EDA will be replaced with U+004F.

Parameters:

stringBuffer - string buffer containing characters to use as source.

start - The starting offset. If this value is less than 0 IllegalArgumentException is thrown.

length - Number of characters to include in the conversion. If this value is less than 0, or
(start + length) > length of the received string buffer IllegalArgumentException is thrown.

indexOf

Retrieves first occurrence of character in section of provided string.

Parameters:

string - String containing section search.

ch - Character to look for.

fromIndex - First element in string to look at. If this value is
less than 0, this method assumes it has the value 0. If this value is
greater than the toIndex parameter, this method assumes it has the same
value as the toIndex parameter.

toIndex - Last element in string to look at. If this value is
greater than the length of the string, this method assumes it has the
same value as the length of the string.

Returns:

Index of the first occurrence of the character within the section
of the string searched. If the fromIndex parameter is greater than, or
equal to the toIndex parameter, then this method returns -1. This method
also returns -1 if it cannot find an occurrence of the character in the
section of the string searched.

indexOf

Retrieves first occurrence of character in section of provided string.

Parameters:

string - String containing section search.

ch - Character to look for.

fromIndex - First element in string to look at. If this value is
less than 0, this method assumes it has the value 0. If this value is
greater than the toIndex parameter, this method assumes it has the same
value as the toIndex parameter.

toIndex - Last element in string to look at. If this value is
greater than the length of the string, this method assumes it has the
same value as the length of the string.

Returns:

Index of the first occurrence of the character within the section
of the string searched. If the fromIndex parameter is greater than, or
equal to the toIndex parameter, then this method returns -1. This method
also returns -1 if it cannot find an occurrence of the character in the
section of the string searched.

stringHashToLong

Returns the first 8 bytes of a SHA1 digest as a long. The same result can be obtained interactively using
the BlackBerry JDE by highlighting a string, right-clicking, and choosing "Convert '<string>' to long" from
the context menu.

stringToWords

This method computes the positions of words in a target string. A
word is defined as a contiguous block of upper and lower case characters,
with the adjacent characters at either end (if they exist) not upper or lower case.

If the resulting array is not large enough to hold the computed
indexes, an ArrayIndexOutOfBoundsException is thrown.

Parameters:

stringContainingWords - Target string to parse.

indexResults - Array of word positions in the target string.

resultOffset - First element of the results array to contain the
first word position for the target string.

writeUTF

Writes a string to the specified DataOutput using UTF-8 encoding in a
machine-independent manner.

First, two bytes are written to out as if by the writeShort
method giving the number of bytes to follow. This value is the number of
bytes actually written out, not the length of the string. Following the
length, each character of the string is output, in sequence, using the
UTF-8 encoding for the character. If no exception is thrown, the
counter written is incremented by the total number of
bytes written to the output stream. This will be at least two
plus the length of str, and at most two plus
thrice the length of str.