@GwtCompatible @ParametersAreNonnullByDefault public final class CharSequences extends Object
Modifier and Type | Method and Description |
---|---|
static int |
compare(CharSequence s,
CharSequence t) |
static int |
compare(CharSequence s,
int sLength,
CharSequence t,
int tLength) |
static int |
compare(CharSequence s,
int sFrom,
int sLength,
CharSequence t,
int tFrom,
int tLength)
compare 2 CharSequence fragments.
|
static int |
compareTo(CharSequence s,
CharSequence t)
Deprecated.
use compare.
|
static boolean |
containsAnyChar(CharSequence string,
char... chars) |
static boolean |
containsAnyChar(CharSequence string,
int start,
int end,
char... chars) |
static boolean |
containsIgnoreCase(CharSequence str,
CharSequence searchStr) |
static int |
countIgnoreCase(CharSequence str,
CharSequence searchStr) |
static int |
distance(char c1,
char c2) |
static int |
distance(CharSequence s1,
CharSequence s2)
function that calculates the number of operations that are needed to transform s1 into s2.
|
static boolean |
endsWith(CharSequence qc,
CharSequence with) |
static boolean |
equals(CharSequence s,
CharSequence t) |
static boolean |
equalsNullables(CharSequence s,
CharSequence t) |
CharSequence |
getJavaRegexpStr(CharSequence wildcard)
Transform a wildcard expression 2 a java regular expression.
|
static int |
hashcode(CharSequence cs) |
static int |
indexOf(CharSequence cs,
int from,
int to,
char... chars) |
static int |
indexOf(CharSequence cs,
int from,
int to,
char c) |
static int |
indexOf(CharSequence cs,
int from,
int to,
IntPredicate cp) |
static int |
indexOfIgnoreCase(CharSequence str,
CharSequence searchStr,
int idxStart) |
static boolean |
isValidFileName(CharSequence fileName) |
static boolean |
isValidJavaId(CharSequence name) |
static int |
lastIndexOfIgnoreCase(CharSequence str,
CharSequence searchStr) |
static Appendable |
lineNumbered(int startLineNr,
Appendable appendable) |
static Appendable |
lineNumbered(int startLineNr,
Appendable appendable,
IntAppender ia) |
static boolean |
match(CharSequence wildcard,
CharSequence cs2Match)
regular wildcard matcher.
|
static int |
parseInt(CharSequence s)
A more flexible version of Integer.parseInt.
|
static int |
parseInt(CharSequence cs,
int radix)
A more flexible version of Integer.parseInt.
|
static long |
parseLong(CharSequence cs)
A more flexible version of Long.parseLong.
|
static long |
parseLong(CharSequence cs,
int radix)
A more flexible version of Long.parseLong.
|
static int |
parseUnsignedInt(CharSequence cs,
int radix,
int idxFrom)
will parse a unsigned integer from a char sequence from idxFrom.
|
static int |
parseUnsignedInt(CharSequence cs,
int radix,
int idxFrom,
int idxTo)
will parse a unsigned integer from a char sequence from idxFrom.
|
static long |
parseUnsignedLong(CharSequence cs,
int radix,
int idxFrom) |
static long |
parseUnsignedLong(CharSequence cs,
int radix,
int idxFrom,
int idxTo,
boolean strict) |
static Reader |
reader(CharSequence cs) |
static boolean |
regionMatches(CharSequence t,
int toffset,
CharSequence other,
int ooffset,
int plen)
Equivalent to String.regionMatches.
|
static boolean |
regionMatchesIgnoreCase(CharSequence ta,
int toffset,
CharSequence pa,
int ooffset,
int plen)
Equivalent/based on to String.regionMatches.
|
static boolean |
startsWith(CharSequence sequence,
CharSequence prefix,
int toffset) |
static CharSequence |
subSequence(CharSequence seq,
int startIdx,
int endIdx) |
static CharSequence |
toLineNumbered(int startLineNr,
CharSequence source) |
static CharSequence |
toLineNumbered(int startLineNr,
CharSequence source,
IntAppender ia) |
static <T extends CharSequence> |
validatedFileName(T fileName) |
public static int distance(CharSequence s1, CharSequence s2)
s1
- s2
- public static int distance(char c1, char c2)
@Deprecated public static int compareTo(CharSequence s, CharSequence t)
s
- t
- public static int compare(CharSequence s, CharSequence t)
public static int compare(CharSequence s, int sLength, CharSequence t, int tLength)
public static int compare(CharSequence s, int sFrom, int sLength, CharSequence t, int tFrom, int tLength)
s
- the charsequence to comparesFrom
- the index for the first chars to compare.sLength
- the number of characters to compare.t
- the charsequence to compare totFrom
- the index for the first character to compare to.tLength
- the number of characters to compare to.public static boolean equalsNullables(CharSequence s, CharSequence t)
public static boolean equals(CharSequence s, CharSequence t)
public static int hashcode(CharSequence cs)
public static CharSequence subSequence(CharSequence seq, int startIdx, int endIdx)
public static boolean startsWith(CharSequence sequence, CharSequence prefix, int toffset)
public static boolean endsWith(CharSequence qc, CharSequence with)
public static Appendable lineNumbered(int startLineNr, Appendable appendable) throws IOException
IOException
public static Appendable lineNumbered(int startLineNr, Appendable appendable, IntAppender ia) throws IOException
IOException
public static CharSequence toLineNumbered(int startLineNr, CharSequence source)
public static CharSequence toLineNumbered(int startLineNr, CharSequence source, IntAppender ia)
public static int parseInt(@Nonnull CharSequence s)
Integer.parseInt
public static int parseInt(@Nonnull CharSequence cs, int radix)
Integer.parseInt
public static int parseUnsignedInt(@Nonnull CharSequence cs, int radix, int idxFrom)
cs
- radix
- idxFrom
- public static int parseUnsignedInt(@Nonnull CharSequence cs, int radix, int idxFrom, int idxTo)
cs
- radix
- idxFrom
- idxTo
- public static long parseUnsignedLong(@Nonnull CharSequence cs, int radix, int idxFrom)
public static long parseUnsignedLong(@Nonnull CharSequence cs, int radix, int idxFrom, int idxTo, boolean strict)
public static long parseLong(@Nonnull CharSequence cs)
Long.parseLong
public static long parseLong(@Nonnull CharSequence cs, int radix)
Long.parseLong
public static boolean containsAnyChar(CharSequence string, char... chars)
public static boolean containsAnyChar(CharSequence string, int start, int end, char... chars)
public static boolean isValidJavaId(CharSequence name)
public static boolean isValidFileName(@Nonnull CharSequence fileName)
public static <T extends CharSequence> T validatedFileName(@Nonnull T fileName)
public static boolean regionMatches(CharSequence t, int toffset, CharSequence other, int ooffset, int plen)
public static boolean regionMatchesIgnoreCase(CharSequence ta, int toffset, CharSequence pa, int ooffset, int plen)
public static boolean match(CharSequence wildcard, CharSequence cs2Match)
wildcard
- cs2Match
- public CharSequence getJavaRegexpStr(CharSequence wildcard)
wildcard
- public static int indexOf(CharSequence cs, int from, int to, char c)
public static int indexOf(CharSequence cs, int from, int to, IntPredicate cp)
public static int indexOf(CharSequence cs, int from, int to, char... chars)
public static boolean containsIgnoreCase(CharSequence str, CharSequence searchStr)
public static int lastIndexOfIgnoreCase(CharSequence str, CharSequence searchStr)
public static int indexOfIgnoreCase(CharSequence str, CharSequence searchStr, int idxStart)
public static int countIgnoreCase(CharSequence str, CharSequence searchStr)
@GwtIncompatible public static Reader reader(CharSequence cs)
Copyright © 2021 SPF4J. All rights reserved.