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 TypeMethodDescriptionchar
charAt(int index)
int
codePointAt(int index)
int
codePointBefore(int index)
int
codePointCount(int beginIndex, int endIndex)
int
int
compareToIgnoreCase(TString anotherString)
boolean
boolean
contentEquals(TCharSequence charSeq)
boolean
contentEquals(TStringBuffer buffer)
static TString
copyValueOf(char[] data)
static TString
copyValueOf(char[] data, int offset, int count)
boolean
boolean
boolean
equalsIgnoreCase(TString other)
static String
static String
byte[]
getBytes()
byte[]
byte[]
void
getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
int
hashCode()
int
indexOf(int ch)
int
indexOf(int ch, int fromIndex)
int
int
intern()
boolean
isBlank()
boolean
isEmpty()
static String
join(CharSequence delimiter, CharSequence... elements)
static String
join(CharSequence delimiter, Iterable<? extends CharSequence> elements)
int
lastIndexOf(int ch)
int
lastIndexOf(int ch, int fromIndex)
int
lastIndexOf(TString str)
int
lastIndexOf(TString str, int fromIndex)
int
length()
boolean
int
offsetByCodePoints(int index, int codePointOffset)
boolean
regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)
boolean
regionMatches(int toffset, TString other, int ooffset, int len)
replace(char oldChar, char newChar)
replace(TCharSequence target, TCharSequence replacement)
replaceAll(String regex, String replacement)
replaceFirst(String regex, String replacement)
String[]
String[]
boolean
startsWith(TString prefix)
boolean
startsWith(TString prefix, int toffset)
subSequence(int beginIndex, int endIndex)
substring(int beginIndex)
substring(int beginIndex, int endIndex)
char[]
toLowerCase(TLocale locale)
toString()
toUpperCase(TLocale locale)
trim()
static String
valueOf(boolean b)
static String
valueOf(char c)
static TString
valueOf(char[] data)
static TString
valueOf(char[] data, int offset, int count)
static String
valueOf(double d)
static String
valueOf(float f)
static String
valueOf(int i)
static String
valueOf(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:
charAt
in 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:
length
in interfaceTCharSequence
-
isEmpty
public boolean isEmpty() -
isBlank
public boolean isBlank() -
getChars
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) -
contentEquals
-
contentEquals
-
compareTo
- Specified by:
compareTo
in 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:
subSequence
in interfaceTCharSequence
-
concat
-
replace
-
contains
-
replace
-
trim
-
toString
- Specified by:
toString
in interfaceTCharSequence
- Overrides:
toString
in 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
-