public class Chr
extends Object
Character array helpers used by the JSON internals.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static void |
_idx(char[] buffer, int location, byte[] chars)Copies a byte array into a character buffer. |
|
public static void |
_idx(char[] array, int startIndex, char[] input)Copies a character array into another array. |
|
public static void |
_idx(char[] array, int startIndex, char[] input, int inputLength)Copies a fixed number of characters into another array. |
|
public static void |
_idx(char[] buffer, int location, byte[] chars, int start, int end)Copies part of a byte array into a character buffer. |
|
public static char[] |
add(char[] array, char v)Appends a character to a new array copy. |
|
public static char[] |
add(char[] array, String str)Appends a string to a new array copy. |
|
public static char[] |
add(char[] array, StringBuilder stringBuilder)Appends a StringBuilder to a new array copy. |
|
public static char[] |
add(char[] array, char[] array2)Concatenates two character arrays. |
|
public static char[] |
add(char[] strings)Concatenates all non-null arrays. |
|
public static char[] |
array(char array)Returns the supplied characters as an array literal helper. |
|
public static char[] |
chars(String array)Converts a string to a character array. |
|
public static boolean |
contains(char[] chars, char c, int start, int length)Tests whether the supplied range contains a character. |
|
public static char[] |
copy(char[] array)Copies an entire character array. |
|
public static char[] |
copy(char[] array, int offset, int length)Copies a character range into a new array. |
|
public static char[] |
grow(char[] array, int size)Grows an array by the supplied increment. |
|
public static char[] |
grow(char[] array)Doubles the size of an array. |
|
public static boolean |
in(char value, char[] array)Tests whether the supplied character occurs in the array. |
|
public static boolean |
in(int value, char[] array)Tests whether the supplied character code occurs in the array. |
|
public static boolean |
in(char value, int offset, char[] array)Tests whether the supplied character occurs in the array from the given offset. |
|
public static boolean |
in(char value, int offset, int end, char[] array)Tests whether the supplied character occurs in the specified array range. |
|
public static char[] |
lpad(char[] in, int size, char pad)Left-pads a character array to the requested size. |
Copies a byte array into a character buffer.
buffer - the destination bufferlocation - the destination offsetchars - the bytes to copyCopies a character array into another array.
array - the destination arraystartIndex - the destination offsetinput - the characters to copyCopies a fixed number of characters into another array.
array - the destination arraystartIndex - the destination offsetinput - the source charactersinputLength - the number of characters to copyCopies part of a byte array into a character buffer.
buffer - the destination bufferlocation - the destination offsetchars - the source bytesstart - the inclusive source startend - the exclusive source endAppends a character to a new array copy.
array - the source arrayv - the character to appendAppends a string to a new array copy.
array - the source arraystr - the string to appendAppends a StringBuilder to a new array copy.
array - the source arraystringBuilder - the characters to appendConcatenates two character arrays.
array - the first arrayarray2 - the second arrayConcatenates all non-null arrays.
strings - the arrays to concatenateReturns the supplied characters as an array literal helper.
array - the characters to returnConverts a string to a character array.
array - the string to convertTests whether the supplied range contains a character.
chars - the array to scanc - the character to findstart - the inclusive scan startlength - the number of characters to scantrue if the character is presentCopies an entire character array.
array - the array to copyCopies a character range into a new array.
array - the source arrayoffset - the inclusive start indexlength - the number of characters to copyGrows an array by the supplied increment.
array - the array to growsize - the number of extra slots to allocateDoubles the size of an array.
array - the array to growTests whether the supplied character occurs in the array.
value - the character to findarray - the array to scantrue if the character is presentTests whether the supplied character code occurs in the array.
value - the character code to findarray - the array to scantrue if the character is presentTests whether the supplied character occurs in the array from the given offset.
value - the character to findoffset - the inclusive scan startarray - the array to scantrue if the character is presentTests whether the supplied character occurs in the specified array range.
value - the character to findoffset - the inclusive scan startend - the exclusive scan endarray - the array to scantrue if the character is presentLeft-pads a character array to the requested size.
in - the input arraysize - the target sizepad - the padding character