public final class Strings extends Object
Modifier and Type | Method and Description |
---|---|
static void |
appendJsonStringEscapedChar(char c,
Appendable jsonString)
Deprecated.
|
static void |
appendJsonStringEscapedChar(char c,
StringBuilder jsonString)
Deprecated.
|
static void |
appendSpaces(Appendable to,
int nrSpaces)
Deprecated.
|
static void |
appendSpaces(StringBuilder to,
int nrSpaces)
Deprecated.
|
static void |
appendUnsignedString(StringBuilder sb,
int nr,
int shift)
Deprecated.
|
static void |
appendUnsignedString(StringBuilder sb,
long nr,
int shift)
Deprecated.
|
static void |
appendUnsignedStringPadded(Appendable sb,
int nr,
int shift,
int padTo)
Deprecated.
|
static void |
appendUnsignedStringPadded(StringBuilder sb,
int nr,
int shift,
int padTo)
Deprecated.
|
static String |
commonPrefix(CharSequence... strs) |
static int |
compareTo(CharSequence s,
CharSequence t)
Deprecated.
use CharSequences.compare
|
static boolean |
contains(CharSequence string,
char... chars)
Deprecated.
use CharSequences.containsAnyChar instead.
|
static boolean |
contains(String string,
char... chars) |
static CharsetDecoder |
createUtf8Decoder() |
static CharsetEncoder |
createUtf8Encoder() |
static String |
decode(CharsetDecoder cd,
byte[] ba,
int off,
int len) |
static int |
distance(String s1,
String s2)
Deprecated.
use CharSequences.distance instead.
|
static byte[] |
encode(CharsetEncoder ce,
char[] ca,
int off,
int len) |
static int |
encode(CharsetEncoder ce,
char[] ca,
int off,
int len,
byte[] targetArray) |
static boolean |
endsWith(CharSequence qc,
CharSequence with)
Deprecated.
|
static boolean |
equals(CharSequence s,
CharSequence t)
Deprecated.
|
static void |
escapeJsonString(String toEscape,
Appendable jsonString)
Deprecated.
|
static void |
escapeJsonString(String toEscape,
StringBuilder jsonString)
Deprecated.
|
static String |
fromUtf8(byte[] bytes)
Optimized UTF8 decoder.
|
static String |
fromUtf8(byte[] bytes,
int startIdx,
int length) |
static int |
getmaxNrBytes(CharsetEncoder ce,
int nrChars) |
static CharsetDecoder |
getUTF8CharsetDecoder() |
static CharsetEncoder |
getUTF8CharsetEncoder() |
static int |
hashcode(CharSequence cs)
Deprecated.
|
static boolean |
regionMatches(CharSequence t,
int toffset,
CharSequence other,
int ooffset,
int plen)
Deprecated.
use CharSequences.regionMatches.
|
static char[] |
steal(String str)
Steal the underlying character array of a String.
|
static CharSequence |
subSequence(CharSequence seq,
int startIdx,
int endIdx)
Deprecated.
|
static byte[] |
toUtf8(String str)
Optimized UTF8 string encoder.
|
static String |
truncate(String value,
int length) |
static String |
unescape(String what) |
static String |
withFirstCharLower(String str) |
static String |
wrap(char[] chars)
Create a String based on the provided character array.
|
static void |
writeReplaceWhitespaces(String str,
char replacement,
Appendable writer) |
public static final String EOL
@Deprecated public static int distance(@Nonnull String s1, @Nonnull String s2)
public static boolean contains(String string, char... chars)
@Deprecated public static boolean contains(CharSequence string, char... chars)
public static void writeReplaceWhitespaces(String str, char replacement, Appendable writer) throws IOException
IOException
public static char[] steal(String str)
str
- public static String wrap(char[] chars)
chars
- public static CharsetEncoder createUtf8Encoder()
public static CharsetDecoder createUtf8Decoder()
public static CharsetEncoder getUTF8CharsetEncoder()
public static CharsetDecoder getUTF8CharsetDecoder()
public static byte[] encode(CharsetEncoder ce, char[] ca, int off, int len)
public static int getmaxNrBytes(CharsetEncoder ce, int nrChars)
public static int encode(CharsetEncoder ce, char[] ca, int off, int len, byte[] targetArray)
public static String decode(CharsetDecoder cd, byte[] ba, int off, int len)
public static String fromUtf8(byte[] bytes)
bytes
- public static String fromUtf8(byte[] bytes, int startIdx, int length)
public static byte[] toUtf8(String str)
str
- @Deprecated public static int compareTo(@Nonnull CharSequence s, @Nonnull CharSequence t)
@Deprecated public static boolean equals(@Nonnull CharSequence s, @Nonnull CharSequence t)
@Deprecated public static int hashcode(CharSequence cs)
@Deprecated public static CharSequence subSequence(CharSequence seq, int startIdx, int endIdx)
@Deprecated public static boolean endsWith(CharSequence qc, CharSequence with)
@Deprecated public static void escapeJsonString(@Nonnull String toEscape, StringBuilder jsonString)
toEscape
- - the java string to escape.jsonString
- - the destination json String builder.@Deprecated public static void escapeJsonString(@Nonnull String toEscape, Appendable jsonString) throws IOException
IOException
@Deprecated public static void appendJsonStringEscapedChar(char c, StringBuilder jsonString)
@Deprecated public static void appendJsonStringEscapedChar(char c, Appendable jsonString) throws IOException
IOException
@Deprecated public static void appendUnsignedString(StringBuilder sb, long nr, int shift)
@Deprecated public static void appendUnsignedString(StringBuilder sb, int nr, int shift)
@Deprecated public static void appendUnsignedStringPadded(StringBuilder sb, int nr, int shift, int padTo)
@Deprecated public static void appendUnsignedStringPadded(Appendable sb, int nr, int shift, int padTo) throws IOException
IOException
@Deprecated public static void appendSpaces(Appendable to, int nrSpaces) throws IOException
IOException
@Deprecated public static void appendSpaces(StringBuilder to, int nrSpaces)
@Deprecated public static boolean regionMatches(CharSequence t, int toffset, CharSequence other, int ooffset, int plen)
@Nonnull public static String commonPrefix(@Nonnull CharSequence... strs)
Copyright © 2018 SPF4J. All rights reserved.