CharSequences.@Deprecated
public final class CharSequences
extends Object
CharSequence implementations.| Modifier and Type | Method and Description |
|---|---|
static boolean |
contentEquals(CharSequence a,
CharSequence b)
Deprecated.
Returns
true if the content of both CharSequence's are equals. |
static boolean |
contentEqualsIgnoreCase(CharSequence a,
CharSequence b)
Deprecated.
Perform a case-insensitive comparison of two
CharSequences. |
static CharSequence |
emptyAsciiString()
Deprecated.
Get a reference to an unmodifiable empty
CharSequence with the same properties as
newAsciiString(Buffer). |
static int |
indexOf(CharSequence sequence,
char c,
int fromIndex)
Deprecated.
Find the index of
c within sequence starting at index fromIndex. |
static boolean |
isAsciiString(CharSequence sequence)
Deprecated.
Check if the provided
CharSequence is an AsciiString,
result of a call to newAsciiString(String). |
static CharSequence |
newAsciiString(Buffer input)
Deprecated.
Create a new
CharSequence from the specified input, supporting only 8-bit ASCII characters, and
with a case-insensitive hashCode. |
static CharSequence |
newAsciiString(String input)
Deprecated.
Create a new
CharSequence from the specified input, supporting only 8-bit ASCII characters, and
with a case-insensitive hashCode. |
static boolean |
regionMatches(CharSequence cs,
boolean ignoreCase,
int csStart,
CharSequence string,
int start,
int length)
Deprecated.
This methods make regionMatches operation correctly for any chars in strings.
|
static List<CharSequence> |
split(CharSequence input,
char delimiter)
Deprecated.
Split a given
CharSequence to separate ones on the given delimiter. |
static Buffer |
unwrapBuffer(CharSequence cs)
Deprecated.
Attempt to unwrap a
CharSequence and obtain the underlying Buffer if possible. |
public static CharSequence newAsciiString(String input)
CharSequence from the specified input, supporting only 8-bit ASCII characters, and
with a case-insensitive hashCode.input - a string containing only 8-bit ASCII characters.CharSequencepublic static CharSequence newAsciiString(Buffer input)
CharSequence from the specified input, supporting only 8-bit ASCII characters, and
with a case-insensitive hashCode.input - a Buffer containingCharSequence.public static CharSequence emptyAsciiString()
CharSequence with the same properties as
newAsciiString(Buffer).CharSequence with the same properties as
newAsciiString(Buffer).public static boolean isAsciiString(CharSequence sequence)
CharSequence is an AsciiString,
result of a call to newAsciiString(String).sequence - The CharSequence to check.true if the check passes.@Nullable public static Buffer unwrapBuffer(CharSequence cs)
CharSequence and obtain the underlying Buffer if possible.cs - the CharSequence to unwrap.Buffer or null.public static boolean contentEqualsIgnoreCase(@Nullable
CharSequence a,
@Nullable
CharSequence b)
CharSequences.
NOTE: This only supports 8-bit ASCII.
a - first CharSequence to compare.b - second CharSequence to compare.true if both CharSequence's are equals when ignoring the case.public static boolean contentEquals(CharSequence a,
CharSequence b)
true if the content of both CharSequence's are equals. This only supports 8-bit ASCII.a - left hand side of comparison.b - right hand side of comparison.true if a's content equals b.public static int indexOf(CharSequence sequence,
char c,
int fromIndex)
c within sequence starting at index fromIndex.sequence - The CharSequence to search in.c - The character to find.fromIndex - The index to start searching (inclusive).c or -1 otherwise.public static List<CharSequence> split(CharSequence input,
char delimiter)
CharSequence to separate ones on the given delimiter.
The returned CharSequences are created by invoking the CharSequence.subSequence(int, int) method
on the main one.
This method has no support for regex.input - The initial CharSequence to split, this experiences no side effectsdelimiter - The delimiter characterList of CharSequence subsequences of the input with the separated valuespublic static boolean regionMatches(CharSequence cs,
boolean ignoreCase,
int csStart,
CharSequence string,
int start,
int length)
cs - the CharSequence to be processedignoreCase - specifies if case should be ignored.csStart - the starting offset in the cs CharSequencestring - the CharSequence to compare.start - the starting offset in the specified string.length - the number of characters to compare.true if the ranges of characters are equal, false otherwise.