@GwtCompatible 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 |
containsIgnoreCase(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 c) |
static int |
indexOfIgnoreCase(CharSequence str,
CharSequence searchStr) |
static boolean |
isValidFileName(CharSequence fileName) |
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 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 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(@Nonnull CharSequence s1, @Nonnull CharSequence s2)
s1
- s2
- public static int distance(char c1, char c2)
@Deprecated public static int compareTo(@Nonnull CharSequence s, @Nonnull CharSequence t)
s
- t
- public static int compare(@Nonnull CharSequence s, @Nonnull CharSequence t)
public static int compare(@Nonnull CharSequence s, int sLength, @Nonnull CharSequence t, int tLength)
public static int compare(@Nonnull CharSequence s, int sFrom, int sLength, @Nonnull 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(@Nullable CharSequence s, @Nullable CharSequence t)
public static boolean equals(@Nonnull CharSequence s, @Nonnull CharSequence t)
public static int hashcode(@Nonnull CharSequence cs)
public static CharSequence subSequence(@Nonnull CharSequence seq, int startIdx, int endIdx)
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 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 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 boolean containsIgnoreCase(CharSequence str, CharSequence searchStr)
public static int indexOfIgnoreCase(CharSequence str, CharSequence searchStr)
Copyright © 2018 SPF4J. All rights reserved.