Package org.teavm.classlib.java.lang
Class TString
java.lang.Object
org.teavm.classlib.java.lang.TObject
org.teavm.classlib.java.lang.TString
- All Implemented Interfaces:
TSerializable,TCharSequence,TComparable<TString>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) intcodePointAt(int index) intcodePointBefore(int index) intcodePointCount(int beginIndex, int endIndex) intintcompareToIgnoreCase(TString anotherString) booleanbooleancontentEquals(TCharSequence charSeq) booleancontentEquals(TStringBuffer buffer) static TStringcopyValueOf(char[] data) static TStringcopyValueOf(char[] data, int offset, int count) booleanbooleanbooleanequalsIgnoreCase(TString other) static Stringstatic Stringbyte[]getBytes()byte[]byte[]voidgetChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) inthashCode()intindexOf(int ch) intindexOf(int ch, int fromIndex) intintintern()booleanisBlank()booleanisEmpty()static TStringjoin(CharSequence delimiter, CharSequence... elements) static Stringjoin(CharSequence delimiter, Iterable<? extends CharSequence> elements) intlastIndexOf(int ch) intlastIndexOf(int ch, int fromIndex) intlastIndexOf(TString str) intlastIndexOf(TString str, int fromIndex) intlength()booleanintoffsetByCodePoints(int index, int codePointOffset) booleanregionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len) booleanregionMatches(int toffset, TString other, int ooffset, int len) repeat(int count) replace(char oldChar, char newChar) replace(TCharSequence target, TCharSequence replacement) replaceAll(String regex, String replacement) replaceFirst(String regex, String replacement) String[]String[]booleanstartsWith(TString prefix) booleanstartsWith(TString prefix, int toffset) strip()subSequence(int beginIndex, int endIndex) substring(int beginIndex) substring(int beginIndex, int endIndex) char[]toLowerCase(TLocale locale) toString()toUpperCase(TLocale locale) trim()static StringvalueOf(boolean b) static StringvalueOf(char c) static TStringvalueOf(char[] data) static TStringvalueOf(char[] data, int offset, int count) static StringvalueOf(double d) static StringvalueOf(float f) static StringvalueOf(int i) static StringvalueOf(long l) static String
-
Field Details
-
CASE_INSENSITIVE_ORDER
-
-
Constructor Details
-
TString
public TString() -
TString
-
TString
public TString(char[] characters) -
TString
public TString(char[] value, int offset, int count) -
TString
public TString(byte[] bytes, int offset, int length, TString charsetName) throws TUnsupportedEncodingException - Throws:
TUnsupportedEncodingException
-
TString
-
TString
public TString(byte[] bytes, int offset, int length) -
TString
public TString(byte[] bytes) -
TString
- Throws:
TUnsupportedEncodingException
-
TString
-
TString
public TString(int[] codePoints, int offset, int count) -
TString
-
-
Method Details
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceTCharSequence
-
codePointAt
public int codePointAt(int index) -
codePointBefore
public int codePointBefore(int index) -
codePointCount
public int codePointCount(int beginIndex, int endIndex) -
offsetByCodePoints
public int offsetByCodePoints(int index, int codePointOffset) -
length
public int length()- Specified by:
lengthin interfaceTCharSequence
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceTCharSequence
-
isBlank
public boolean isBlank() -
getChars
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) -
contentEquals
-
contentEquals
-
compareTo
- Specified by:
compareToin interfaceTComparable<TString>
-
compareToIgnoreCase
-
startsWith
-
startsWith
-
regionMatches
-
regionMatches
-
endsWith
-
indexOf
public int indexOf(int ch, int fromIndex) -
indexOf
public int indexOf(int ch) -
lastIndexOf
public int lastIndexOf(int ch, int fromIndex) -
lastIndexOf
public int lastIndexOf(int ch) -
indexOf
-
indexOf
-
lastIndexOf
-
lastIndexOf
-
substring
-
substring
-
subSequence
- Specified by:
subSequencein interfaceTCharSequence
-
concat
-
replace
-
contains
-
replace
-
trim
-
strip
-
stripLeading
-
stripTrailing
-
toString
- Specified by:
toStringin interfaceTCharSequence- Overrides:
toStringin classTObject
-
toCharArray
public char[] toCharArray() -
valueOf
-
valueOf
-
valueOf
-
copyValueOf
-
copyValueOf
-
valueOf
-
valueOf
-
valueOf
-
valueOf
-
valueOf
-
valueOf
-
equals
-
equalsIgnoreCase
-
getBytes
- Throws:
TUnsupportedEncodingException
-
getBytes
public byte[] getBytes() -
getBytes
-
hashCode
public int hashCode() -
toLowerCase
-
toLowerCase
-
toUpperCase
-
toUpperCase
-
intern
-
matches
-
split
-
split
-
replaceAll
-
replaceFirst
-
format
-
format
-
join
-
join
-
repeat
-