| java.lang.Object com.ibm.icu.impl.Utility
Utility | final public class Utility (Code) | | |
Method Summary | |
final public static byte[] | RLEStringToByteArray(String s) Construct an array of bytes from a run-length encoded string. | final public static char[] | RLEStringToCharArray(String s) Construct an array of shorts from a run-length encoded string. | final public static int[] | RLEStringToIntArray(String s) Construct an array of ints from a run-length encoded string. | final public static short[] | RLEStringToShortArray(String s) Construct an array of shorts from a run-length encoded string. | public static StringBuffer | appendNumber(StringBuffer result, int n) Append a number to the given StringBuffer in the radix 10
generating at least one digit. | public static StringBuffer | appendNumber(StringBuffer result, int n, int radix, int minDigits) Append a number to the given StringBuffer in the given radix.
Standard digits '0'-'9' are used and letters 'A'-'Z' for
radices 11 through 36.
Parameters: result - the digits of the number are appended here Parameters: n - the number to be converted to digits; may be negative.If negative, a '-' is prepended to the digits. Parameters: radix - a radix from 2 to 36 inclusive. Parameters: minDigits - the minimum number of digits, not includingany '-', to produce. | public static void | appendToRule(StringBuffer rule, int c, boolean isLiteral, boolean escapeUnprintable, StringBuffer quoteBuf) Append a character to a rule that is being built up. | public static void | appendToRule(StringBuffer rule, String text, boolean isLiteral, boolean escapeUnprintable, StringBuffer quoteBuf) Append the given string to the rule. | public static void | appendToRule(StringBuffer rule, UnicodeMatcher matcher, boolean escapeUnprintable, StringBuffer quoteBuf) Given a matcher reference, which may be null, append its
pattern as a literal to the given rule. | final public static boolean | arrayEquals(Object[] source, Object target) Convenience utility to compare two Object[]s. | final public static boolean | arrayEquals(int[] source, Object target) | final public static boolean | arrayEquals(double[] source, Object target) | final public static boolean | arrayEquals(byte[] source, Object target) | final public static boolean | arrayEquals(Object source, Object target) | final public static boolean | arrayRegionMatches(Object[] source, int sourceStart, Object[] target, int targetStart, int len) Convenience utility to compare two Object[]s
Ought to be in System. | final public static boolean | arrayRegionMatches(char[] source, int sourceStart, char[] target, int targetStart, int len) Convenience utility to compare two Object[]s
Ought to be in System. | final public static boolean | arrayRegionMatches(int[] source, int sourceStart, int[] target, int targetStart, int len) Convenience utility to compare two int[]s. | final public static boolean | arrayRegionMatches(double[] source, int sourceStart, double[] target, int targetStart, int len) Convenience utility to compare two arrays of doubles. | final public static boolean | arrayRegionMatches(byte[] source, int sourceStart, byte[] target, int targetStart, int len) | final public static String | arrayToRLEString(int[] a) Construct a string representing an int array. | final public static String | arrayToRLEString(short[] a) Construct a string representing a short array. | final public static String | arrayToRLEString(char[] a) Construct a string representing a char array. | final public static String | arrayToRLEString(byte[] a) Construct a string representing a byte array. | final public static int | compareUnsigned(int source, int target) | public static String | deleteRuleWhiteSpace(String str) Remove all rule white space from a string. | final public static String | escape(String s) Convert characters outside the range U+0020 to U+007F to
Unicode escapes, and convert backslash to a double backslash. | public static boolean | escapeUnprintable(StringBuffer result, int c) Escape unprintable characters using uxxxx notation
for U+0000 to U+FFFF and Uxxxxxxxx for U+10000 and
above. | final public static String | format1ForSource(String s) Format a String for representation in a source file. | final public static String | formatForSource(String s) Format a String for representation in a source file. | public static void | getChars(StringBuffer src, int srcBegin, int srcEnd, char dst, int dstBegin) Similar to StringBuffer.getChars, version 1.3. | final static int | getInt(String s, int i) | public static String | hex(char ch) Convert a char to 4 hex uppercase digits. | public static String | hex(String s) Convert a string to comma-separated groups of 4 hex uppercase
digits. | public static String | hex(StringBuffer s) Convert a string to comma-separated groups of 4 hex uppercase
digits. | public static StringBuffer | hex(char ch, StringBuffer output) Convert a char to 4 hex uppercase digits. | public static StringBuffer | hex(int ch, int width, StringBuffer output) Convert a integer to size width hex uppercase digits. | public static String | hex(int ch, int width) Convert a integer to size width (minimum) hex uppercase digits.
E.g., hex('a', 4, str) => "0041". | public static String | hex(long i, int places) | public static String | hex(long ch) | public static StringBuffer | hex(String s, StringBuffer result) Convert a string to comma-separated groups of 4 hex uppercase
digits. | final public static byte | highBit(int n) Find the highest bit in a positive integer. | public static int | indexOf(StringBuffer buf, String s) | public static int | indexOf(StringBuffer buf, String s, int i) | public static boolean | isUnprintable(int c) Return true if the character is NOT printable ASCII. | public static int | lastIndexOf(StringBuffer buf, String s) | public static int | lastIndexOf(StringBuffer buf, String s, int i) | public static int | lookup(String source, String[] target) Look up a given string in a string array. | final public static boolean | objectEquals(Object source, Object target) Convenience utility. | public static boolean | parseChar(String id, int[] pos, char ch) Parse a single non-whitespace character 'ch', optionally
preceded by whitespace.
Parameters: id - the string to be parsed Parameters: pos - INPUT-OUTPUT parameter. | public static int | parseInteger(String rule, int[] pos, int limit) Parse an integer at pos, either of the form \d+ or of the form
0x[0-9A-Fa-f]+ or 0[0-7]+, that is, in standard decimal, hex,
or octal format.
Parameters: pos - INPUT-OUTPUT parameter. | public static int | parseNumber(String text, int[] pos, int radix) Parse an unsigned 31-bit integer at the given offset. | public static int | parsePattern(String rule, int pos, int limit, String pattern, int[] parsedInts) Parse a pattern string starting at offset pos. | public static int | parsePattern(String pat, Replaceable text, int index, int limit) Parse a pattern string within the given Replaceable and a parsing
pattern. | public static String | parseUnicodeIdentifier(String str, int[] pos) Parse a Unicode identifier from the given string at the given
position. | public static int | quotedIndexOf(String text, int start, int limit, String setOfChars) Returns the index of the first character in a set, ignoring quoted text.
For example, in the string "abc'hide'h", the 'h' in "hide" will not be
found by a search for "h". | public static String | repeat(String s, int count) | public static String | replaceAll(String src, String target, String replacement) | public static int | skipWhitespace(String str, int pos) Skip over a sequence of zero or more white space characters
at pos. | public static void | skipWhitespace(String str, int[] pos) Skip over a sequence of zero or more white space characters
at pos[0], advancing it. | public static void | split(String s, char divider, String[] output) Split a string into pieces based on the given divider character
Parameters: s - the string to split Parameters: divider - the character on which to split. | public static String[] | split(String s, char divider) Split a string into pieces based on the given divider character
Parameters: s - the string to split Parameters: divider - the character on which to split. | public static StringBuffer | trim(StringBuffer b) Trim whitespace from ends of a StringBuffer. | public static String | unescape(String s) Convert all escapes in a given string using unescapeAt(). | public static int | unescapeAt(String s, int[] offset16) Convert an escape to a 32-bit code point value. | public static String | unescapeLeniently(String s) Convert all escapes in a given string using unescapeAt(). | public static String | valueOf(int[] source) Utility method to take a int[] containing codepoints and return
a string representation with code units. |
DIGITS | final static char DIGITS(Code) | | |
ESCAPE_BYTE | final static byte ESCAPE_BYTE(Code) | | The ESCAPE_BYTE character is used during run-length encoding. It signals
a run of identical bytes.
|
HEX_DIGIT | final static char[] HEX_DIGIT(Code) | | |
RLEStringToByteArray | final public static byte[] RLEStringToByteArray(String s)(Code) | | Construct an array of bytes from a run-length encoded string.
|
RLEStringToCharArray | final public static char[] RLEStringToCharArray(String s)(Code) | | Construct an array of shorts from a run-length encoded string.
|
RLEStringToIntArray | final public static int[] RLEStringToIntArray(String s)(Code) | | Construct an array of ints from a run-length encoded string.
|
RLEStringToShortArray | final public static short[] RLEStringToShortArray(String s)(Code) | | Construct an array of shorts from a run-length encoded string.
|
appendNumber | public static StringBuffer appendNumber(StringBuffer result, int n)(Code) | | Append a number to the given StringBuffer in the radix 10
generating at least one digit.
|
appendNumber | public static StringBuffer appendNumber(StringBuffer result, int n, int radix, int minDigits) throws IllegalArgumentException(Code) | | Append a number to the given StringBuffer in the given radix.
Standard digits '0'-'9' are used and letters 'A'-'Z' for
radices 11 through 36.
Parameters: result - the digits of the number are appended here Parameters: n - the number to be converted to digits; may be negative.If negative, a '-' is prepended to the digits. Parameters: radix - a radix from 2 to 36 inclusive. Parameters: minDigits - the minimum number of digits, not includingany '-', to produce. Values less than 2 have no effect. Onedigit is always emitted regardless of this parameter. a reference to result |
appendToRule | public static void appendToRule(StringBuffer rule, int c, boolean isLiteral, boolean escapeUnprintable, StringBuffer quoteBuf)(Code) | | Append a character to a rule that is being built up. To flush
the quoteBuf to rule, make one final call with isLiteral == true.
If there is no final character, pass in (int)-1 as c.
Parameters: rule - the string to append the character to Parameters: c - the character to append, or (int)-1 if none. Parameters: isLiteral - if true, then the given character should not bequoted or escaped. Usually this means it is a syntactic elementsuch as > or $ Parameters: escapeUnprintable - if true, then unprintable charactersshould be escaped using escapeUnprintable(). These escapes willappear outside of quotes. Parameters: quoteBuf - a buffer which is used to build up quotedsubstrings. The caller should initially supply an empty buffer,and thereafter should not modify the buffer. The buffer should becleared out by, at the end, calling this method with a literalcharacter (which may be -1). |
appendToRule | public static void appendToRule(StringBuffer rule, String text, boolean isLiteral, boolean escapeUnprintable, StringBuffer quoteBuf)(Code) | | Append the given string to the rule. Calls the single-character
version of appendToRule for each character.
|
appendToRule | public static void appendToRule(StringBuffer rule, UnicodeMatcher matcher, boolean escapeUnprintable, StringBuffer quoteBuf)(Code) | | Given a matcher reference, which may be null, append its
pattern as a literal to the given rule.
|
arrayEquals | final public static boolean arrayEquals(Object[] source, Object target)(Code) | | Convenience utility to compare two Object[]s.
Ought to be in System
|
arrayEquals | final public static boolean arrayEquals(int[] source, Object target)(Code) | | Convenience utility to compare two int[]s
Ought to be in System
|
arrayEquals | final public static boolean arrayEquals(double[] source, Object target)(Code) | | Convenience utility to compare two double[]s
Ought to be in System
|
arrayEquals | final public static boolean arrayEquals(byte[] source, Object target)(Code) | | |
arrayEquals | final public static boolean arrayEquals(Object source, Object target)(Code) | | Convenience utility to compare two Object[]s
Ought to be in System
|
arrayRegionMatches | final public static boolean arrayRegionMatches(Object[] source, int sourceStart, Object[] target, int targetStart, int len)(Code) | | Convenience utility to compare two Object[]s
Ought to be in System.
Parameters: len - the length to compare.The start indices and start+len must be valid. |
arrayRegionMatches | final public static boolean arrayRegionMatches(char[] source, int sourceStart, char[] target, int targetStart, int len)(Code) | | Convenience utility to compare two Object[]s
Ought to be in System.
Parameters: len - the length to compare.The start indices and start+len must be valid. |
arrayRegionMatches | final public static boolean arrayRegionMatches(int[] source, int sourceStart, int[] target, int targetStart, int len)(Code) | | Convenience utility to compare two int[]s.
Parameters: len - the length to compare.The start indices and start+len must be valid.Ought to be in System |
arrayRegionMatches | final public static boolean arrayRegionMatches(double[] source, int sourceStart, double[] target, int targetStart, int len)(Code) | | Convenience utility to compare two arrays of doubles.
Parameters: len - the length to compare.The start indices and start+len must be valid.Ought to be in System |
arrayRegionMatches | final public static boolean arrayRegionMatches(byte[] source, int sourceStart, byte[] target, int targetStart, int len)(Code) | | |
arrayToRLEString | final public static String arrayToRLEString(int[] a)(Code) | | Construct a string representing an int array. Use run-length encoding.
A character represents itself, unless it is the ESCAPE character. Then
the following notations are possible:
ESCAPE ESCAPE ESCAPE literal
ESCAPE n c n instances of character c
Since an encoded run occupies 3 characters, we only encode runs of 4 or
more characters. Thus we have n > 0 and n != ESCAPE and n <= 0xFFFF.
If we encounter a run where n == ESCAPE, we represent this as:
c ESCAPE n-1 c
The ESCAPE value is chosen so as not to collide with commonly
seen values.
|
arrayToRLEString | final public static String arrayToRLEString(short[] a)(Code) | | Construct a string representing a short array. Use run-length encoding.
A character represents itself, unless it is the ESCAPE character. Then
the following notations are possible:
ESCAPE ESCAPE ESCAPE literal
ESCAPE n c n instances of character c
Since an encoded run occupies 3 characters, we only encode runs of 4 or
more characters. Thus we have n > 0 and n != ESCAPE and n <= 0xFFFF.
If we encounter a run where n == ESCAPE, we represent this as:
c ESCAPE n-1 c
The ESCAPE value is chosen so as not to collide with commonly
seen values.
|
arrayToRLEString | final public static String arrayToRLEString(char[] a)(Code) | | Construct a string representing a char array. Use run-length encoding.
A character represents itself, unless it is the ESCAPE character. Then
the following notations are possible:
ESCAPE ESCAPE ESCAPE literal
ESCAPE n c n instances of character c
Since an encoded run occupies 3 characters, we only encode runs of 4 or
more characters. Thus we have n > 0 and n != ESCAPE and n <= 0xFFFF.
If we encounter a run where n == ESCAPE, we represent this as:
c ESCAPE n-1 c
The ESCAPE value is chosen so as not to collide with commonly
seen values.
|
arrayToRLEString | final public static String arrayToRLEString(byte[] a)(Code) | | Construct a string representing a byte array. Use run-length encoding.
Two bytes are packed into a single char, with a single extra zero byte at
the end if needed. A byte represents itself, unless it is the
ESCAPE_BYTE. Then the following notations are possible:
ESCAPE_BYTE ESCAPE_BYTE ESCAPE_BYTE literal
ESCAPE_BYTE n b n instances of byte b
Since an encoded run occupies 3 bytes, we only encode runs of 4 or
more bytes. Thus we have n > 0 and n != ESCAPE_BYTE and n <= 0xFF.
If we encounter a run where n == ESCAPE_BYTE, we represent this as:
b ESCAPE_BYTE n-1 b
The ESCAPE_BYTE value is chosen so as not to collide with commonly
seen values.
|
compareUnsigned | final public static int compareUnsigned(int source, int target)(Code) | | Compares 2 unsigned integers
Parameters: source - 32 bit unsigned integer Parameters: target - 32 bit unsigned integer 0 if equals, 1 if source is greater than target and -1otherwise |
deleteRuleWhiteSpace | public static String deleteRuleWhiteSpace(String str)(Code) | | Remove all rule white space from a string.
|
escape | final public static String escape(String s)(Code) | | Convert characters outside the range U+0020 to U+007F to
Unicode escapes, and convert backslash to a double backslash.
|
escapeUnprintable | public static boolean escapeUnprintable(StringBuffer result, int c)(Code) | | Escape unprintable characters using uxxxx notation
for U+0000 to U+FFFF and Uxxxxxxxx for U+10000 and
above. If the character is printable ASCII, then do nothing
and return FALSE. Otherwise, append the escaped notation and
return TRUE.
|
format1ForSource | final public static String format1ForSource(String s)(Code) | | Format a String for representation in a source file. Like
formatForSource but does not do line breaking.
|
formatForSource | final public static String formatForSource(String s)(Code) | | Format a String for representation in a source file. This includes
breaking it into lines and escaping characters using octal notation
when necessary (control characters and double quotes).
|
getChars | public static void getChars(StringBuffer src, int srcBegin, int srcEnd, char dst, int dstBegin)(Code) | | Similar to StringBuffer.getChars, version 1.3.
Since JDK 1.2 implements StringBuffer.getChars differently, this method
is here to provide consistent results.
To be removed after JDK 1.2 ceased to be the reference platform.
Parameters: src - source string buffer Parameters: srcBegin - offset to the start of the src to retrieve from Parameters: srcEnd - offset to the end of the src to retrieve from Parameters: dst - char array to store the retrieved chars Parameters: dstBegin - offset to the start of the destination char array tostore the retrieved chars |
hex | public static String hex(char ch)(Code) | | Convert a char to 4 hex uppercase digits. E.g., hex('a') =>
"0041".
|
hex | public static String hex(String s)(Code) | | Convert a string to comma-separated groups of 4 hex uppercase
digits. E.g., hex('ab') => "0041,0042".
|
hex | public static String hex(StringBuffer s)(Code) | | Convert a string to comma-separated groups of 4 hex uppercase
digits. E.g., hex('ab') => "0041,0042".
|
hex | public static StringBuffer hex(char ch, StringBuffer output)(Code) | | Convert a char to 4 hex uppercase digits. E.g., hex('a') =>
"0041". Append the output to the given StringBuffer.
|
hex | public static StringBuffer hex(int ch, int width, StringBuffer output)(Code) | | Convert a integer to size width hex uppercase digits.
E.g., hex('a', 4, str) => "0041".
Append the output to the given StringBuffer.
If width is too small to fit, nothing will be appended to output.
|
hex | public static String hex(int ch, int width)(Code) | | Convert a integer to size width (minimum) hex uppercase digits.
E.g., hex('a', 4, str) => "0041". If the integer requires more
than width digits, more will be used.
|
hex | public static String hex(long i, int places)(Code) | | Supplies a zero-padded hex representation of an integer (without 0x)
|
hex | public static StringBuffer hex(String s, StringBuffer result)(Code) | | Convert a string to comma-separated groups of 4 hex uppercase
digits. E.g., hex('ab') => "0041,0042". Append the output
to the given StringBuffer.
|
highBit | final public static byte highBit(int n)(Code) | | Find the highest bit in a positive integer. This is done
by doing a binary search through the bits.
Parameters: n - is the integer the bit number of the highest bit, with 0 beingthe low order bit, or -1 if n is not positive |
isUnprintable | public static boolean isUnprintable(int c)(Code) | | Return true if the character is NOT printable ASCII. The tab,
newline and linefeed characters are considered unprintable.
|
lookup | public static int lookup(String source, String[] target)(Code) | | Look up a given string in a string array. Returns the index at
which the first occurrence of the string was found in the
array, or -1 if it was not found.
Parameters: source - the string to search for Parameters: target - the array of zero or more strings in which tolook for source the index of target at which source first occurs, or -1if not found |
objectEquals | final public static boolean objectEquals(Object source, Object target)(Code) | | Convenience utility. Does null checks on objects, then calls equals.
|
parseChar | public static boolean parseChar(String id, int[] pos, char ch)(Code) | | Parse a single non-whitespace character 'ch', optionally
preceded by whitespace.
Parameters: id - the string to be parsed Parameters: pos - INPUT-OUTPUT parameter. On input, pos[0] is theoffset of the first character to be parsed. On output, pos[0]is the index after the last parsed character. If the parsefails, pos[0] will be unchanged. Parameters: ch - the non-whitespace character to be parsed. true if 'ch' is seen preceded by zero or morewhitespace characters. |
parseInteger | public static int parseInteger(String rule, int[] pos, int limit)(Code) | | Parse an integer at pos, either of the form \d+ or of the form
0x[0-9A-Fa-f]+ or 0[0-7]+, that is, in standard decimal, hex,
or octal format.
Parameters: pos - INPUT-OUTPUT parameter. On input, the firstcharacter to parse. On output, the character after the lastparsed character. |
parseNumber | public static int parseNumber(String text, int[] pos, int radix)(Code) | | Parse an unsigned 31-bit integer at the given offset. Use
UCharacter.digit() to parse individual characters into digits.
Parameters: text - the text to be parsed Parameters: pos - INPUT-OUTPUT parameter. On entry, pos[0] is theoffset within text at which to start parsing; it should pointto a valid digit. On exit, pos[0] is the offset after the lastparsed character. If the parse failed, it will be unchanged onexit. Must be >= 0 on entry. Parameters: radix - the radix in which to parse; must be >= 2 and <=36. a non-negative parsed number, or -1 upon parse failure.Parse fails if there are no digits, that is, if pos[0] does notpoint to a valid digit on entry, or if the number to be parseddoes not fit into a 31-bit unsigned integer. |
parsePattern | public static int parsePattern(String rule, int pos, int limit, String pattern, int[] parsedInts)(Code) | | Parse a pattern string starting at offset pos. Keywords are
matched case-insensitively. Spaces may be skipped and may be
optional or required. Integer values may be parsed, and if
they are, they will be returned in the given array. If
successful, the offset of the next non-space character is
returned. On failure, -1 is returned.
Parameters: pattern - must only contain lowercase characters, whichwill match their uppercase equivalents as well. A spacecharacter matches one or more required spaces. A '~' charactermatches zero or more optional spaces. A '#' character matchesan integer and stores it in parsedInts, which the caller mustensure has enough capacity. Parameters: parsedInts - array to receive parsed integers. Callermust ensure that parsedInts.length is >= the number of '#'signs in 'pattern'. the position after the last character parsed, or -1 ifthe parse failed |
parsePattern | public static int parsePattern(String pat, Replaceable text, int index, int limit)(Code) | | Parse a pattern string within the given Replaceable and a parsing
pattern. Characters are matched literally and case-sensitively
except for the following special characters:
~ zero or more uprv_isRuleWhiteSpace chars
If end of pattern is reached with all matches along the way,
pos is advanced to the first unparsed index and returned.
Otherwise -1 is returned.
Parameters: pat - pattern that controls parsing Parameters: text - text to be parsed, starting at index Parameters: index - offset to first character to parse Parameters: limit - offset after last character to parse index after last parsed character, or -1 on parse failure. |
parseUnicodeIdentifier | public static String parseUnicodeIdentifier(String str, int[] pos)(Code) | | Parse a Unicode identifier from the given string at the given
position. Return the identifier, or null if there is no
identifier.
Parameters: str - the string to parse Parameters: pos - INPUT-OUPUT parameter. On INPUT, pos[0] is thefirst character to examine. It must be less than str.length(),and it must not point to a whitespace character. That is, musthave pos[0] < str.length() and!UCharacterProperty.isRuleWhiteSpace(UTF16.charAt(str, pos[0])). OnOUTPUT, the position after the last parsed character. the Unicode identifier, or null if there is no valididentifier at pos[0]. |
quotedIndexOf | public static int quotedIndexOf(String text, int start, int limit, String setOfChars)(Code) | | Returns the index of the first character in a set, ignoring quoted text.
For example, in the string "abc'hide'h", the 'h' in "hide" will not be
found by a search for "h". Unlike String.indexOf(), this method searches
not for a single character, but for any character of the string
setOfChars .
Parameters: text - text to be searched Parameters: start - the beginning index, inclusive; 0 <= start<= limit . Parameters: limit - the ending index, exclusive; start <= limit<= text.length() . Parameters: setOfChars - string with one or more distinct characters Offset of the first character in setOfChars found, or -1 if not found. See Also: String.indexOf |
repeat | public static String repeat(String s, int count)(Code) | | Utility to duplicate a string count times
Parameters: s - Parameters: count - |
skipWhitespace | public static int skipWhitespace(String str, int pos)(Code) | | Skip over a sequence of zero or more white space characters
at pos. Return the index of the first non-white-space character
at or after pos, or str.length(), if there is none.
|
skipWhitespace | public static void skipWhitespace(String str, int[] pos)(Code) | | Skip over a sequence of zero or more white space characters
at pos[0], advancing it.
|
split | public static void split(String s, char divider, String[] output)(Code) | | Split a string into pieces based on the given divider character
Parameters: s - the string to split Parameters: divider - the character on which to split. Occurrences ofthis character are not included in the output Parameters: output - an array to receive the substrings betweeninstances of divider. It must be large enough on entry toaccomodate all output. Adjacent instances of the dividercharacter will place empty strings into output. Beforereturning, output is padded out with empty strings. |
split | public static String[] split(String s, char divider)(Code) | | Split a string into pieces based on the given divider character
Parameters: s - the string to split Parameters: divider - the character on which to split. Occurrences ofthis character are not included in the output output an array to receive the substrings betweeninstances of divider. Adjacent instances of the dividercharacter will place empty strings into output. |
unescapeAt | public static int unescapeAt(String s, int[] offset16)(Code) | | Convert an escape to a 32-bit code point value. We attempt
to parallel the icu4c unescapeAt() function.
Parameters: offset16 - an array containing offset to the characterafter the backslash. Upon return offset16[0] willbe updated to point after the escape sequence. character value from 0 to 10FFFF, or -1 on error. |
unescapeLeniently | public static String unescapeLeniently(String s)(Code) | | Convert all escapes in a given string using unescapeAt().
Leave invalid escape sequences unchanged.
|
valueOf | public static String valueOf(int[] source)(Code) | | Utility method to take a int[] containing codepoints and return
a string representation with code units.
|
|
|