Klasse CharArrayUtils
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.util.CharArrayUtils
A static utility class for char arrays.
-
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final char[]
static final char[][]
static final char[]
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic final int
compare
(char[] str1, char[] str2) Implements a lexicographical comparator for char arrays.static char[]
concat
(char[]... toCatenate) Answers a new array which is the concatenation of all the given arrays.static final char[]
concat
(char[] first, char[] second) static final char[]
concat
(char[] first, char[] second, char[] third) static final char[]
concat
(char[] first, char[] second, char[] third, char[] fourth) static boolean
endsWith
(char[] fieldDescriptor, char c) static final boolean
equals
(char[][] strarr1, char[][] strarr2) static final boolean
equals
(char[] str1, char[] str2) static final boolean
equals
(char[] str1, int start1, int length1, char[] str2) Returnstrue
if the contents of a section of a character array are the same as contents of another character array.static final boolean
equals
(char[] str1, int start1, int length1, char[] str2, boolean ignoreCase) static final boolean
Returnstrue
if the contents of a section of a character array are the same as contents of a string.static final boolean
Returnstrue
if the contents of a character array are the same as contents of a string.static final char[]
extract
(char[] str, int start, int length) static char[]
Converts aStringBuilder
to a character array.static final boolean
hasCharAt
(char toLookFor, int position, char[] toSearch) Returns true iff the given array contains the given char at the given positionstatic final int
hash
(char[] str) static final int
hash
(char[] str, int start, int length) static final int
indexOf
(char[] toBeFound, char[] array) static int
indexOf
(char[] searchFor, char[][] searchIn) Finds an array of chars in an array of arrays of chars.static final int
indexOf
(char toBeFound, char[] array) static int
indexOf
(char toBeFound, char[] buffer, int start, int end) static final int
lastIndexOf
(char[] toBeFound, char[] array) static int
lastIndexOf
(char[] toBeFound, char[] array, int fromIndex) static int
lastIndexOf
(char toBeFound, char[] array) static int
lastIndexOf
(char toBeFound, char[] array, int fromIndex) static final char[]
lastSegment
(char[] array, char[] separator) static char[]
notNull
(char[] contents) If the given array is null, returns the empty array.static void
overWrite
(char[] buff, int i, char[] charImage) static final char[]
replace
(char[] array, char[] toBeReplaced, char[] replacementChars) static boolean
startsWith
(char[] fieldDescriptor, char c) static final boolean
startsWith
(char[] str1, String str2) Returnstrue
if a prefix of the character array is the same as contents of a string.static final char[][]
subarray
(char[][] array, int start, int end) static char[]
subarray
(char[] inputString, int index) static final char[]
subarray
(char[] array, int start, int end) static final char[]
trim
(char[] chars)
-
Felddetails
-
EMPTY_CHAR_ARRAY
public static final char[] EMPTY_CHAR_ARRAY- Seit:
- 5.4
-
EMPTY
public static final char[] EMPTY -
EMPTY_ARRAY_OF_CHAR_ARRAYS
public static final char[][] EMPTY_ARRAY_OF_CHAR_ARRAYS- Seit:
- 5.7
-
-
Methodendetails
-
hash
public static final int hash(char[] str, int start, int length) -
hash
public static final int hash(char[] str) -
equals
public static final boolean equals(char[] str1, char[] str2) -
equals
public static final boolean equals(char[][] strarr1, char[][] strarr2) -
equals
Returnstrue
if the contents of a character array are the same as contents of a string.- Seit:
- 5.4
-
hasCharAt
public static final boolean hasCharAt(char toLookFor, int position, char[] toSearch) Returns true iff the given array contains the given char at the given position -
equals
Returnstrue
if the contents of a section of a character array are the same as contents of a string.- Seit:
- 5.5
-
startsWith
Returnstrue
if a prefix of the character array is the same as contents of a string.- Seit:
- 5.4
-
compare
public static final int compare(char[] str1, char[] str2) Implements a lexicographical comparator for char arrays. Comparison is done on a per char basis, not a code-point basis.- Parameter:
str1
- the first of the two char arrays to comparestr2
- the second of the two char arrays to compare- Gibt zurück:
- 0 if str1==str2, -1 if str1 < str2 and 1 if str1 > str2
-
equals
public static final boolean equals(char[] str1, int start1, int length1, char[] str2) Returnstrue
if the contents of a section of a character array are the same as contents of another character array. -
equals
public static final boolean equals(char[] str1, int start1, int length1, char[] str2, boolean ignoreCase) -
extract
public static final char[] extract(char[] str, int start, int length) -
concat
public static final char[] concat(char[] first, char[] second) -
concat
public static final char[] concat(char[] first, char[] second, char[] third) -
concat
public static final char[] concat(char[] first, char[] second, char[] third, char[] fourth) -
concat
public static char[] concat(char[]... toCatenate) Answers a new array which is the concatenation of all the given arrays.- Seit:
- 3.12
-
replace
public static final char[] replace(char[] array, char[] toBeReplaced, char[] replacementChars) -
subarray
public static final char[][] subarray(char[][] array, int start, int end) -
subarray
public static final char[] subarray(char[] array, int start, int end) -
indexOf
public static final int indexOf(char toBeFound, char[] array) -
indexOf
public static int indexOf(char toBeFound, char[] buffer, int start, int end) -
indexOf
public static final int indexOf(char[] toBeFound, char[] array) -
lastIndexOf
public static final int lastIndexOf(char[] toBeFound, char[] array) -
lastIndexOf
public static int lastIndexOf(char toBeFound, char[] array) - Seit:
- 5.11
-
lastIndexOf
public static int lastIndexOf(char toBeFound, char[] array, int fromIndex) - Seit:
- 5.11
-
lastIndexOf
public static int lastIndexOf(char[] toBeFound, char[] array, int fromIndex) - Seit:
- 5.11
-
trim
public static final char[] trim(char[] chars) -
lastSegment
public static final char[] lastSegment(char[] array, char[] separator) -
overWrite
public static void overWrite(char[] buff, int i, char[] charImage) -
indexOf
public static int indexOf(char[] searchFor, char[][] searchIn) Finds an array of chars in an array of arrays of chars.- Gibt zurück:
- offset where the array was found or
-1
-
extractChars
Converts aStringBuilder
to a character array.- Seit:
- 5.5
-
subarray
public static char[] subarray(char[] inputString, int index) -
startsWith
public static boolean startsWith(char[] fieldDescriptor, char c) -
notNull
public static char[] notNull(char[] contents) If the given array is null, returns the empty array. Otherwise, returns the argument. -
endsWith
public static boolean endsWith(char[] fieldDescriptor, char c)
-