String - JRE Emulation | JRE Emulation
public class

String

extends Object
implements CharSequence Comparable<String> Serializable
java.lang.Object
   ↳ java.lang.String

Class Overview

Stub implementation of java.lang.String.

See Also

Summary

Fields
public static final Comparator<String> CASE_INSENSITIVE_ORDER
Public Constructors
String()
String(byte[] bytes)
String(byte[] bytes, int hibyte)
String(byte[] bytes, int offset, int count)
String(byte[] bytes, int hibyte, int offset, int count)
String(byte[] bytes, int i, int j, String s)
String(byte[] bytes, int offset, int length, Charset charset)
String(byte[] bytes, Charset cs)
String(byte[] bytes, String s)
String(char[] chars)
String(char[] chars, int i, int j)
String(int[] codePoints, int offset, int length)
String(String s)
String(StringBuffer sb)
String(StringBuilder sb)
Public Methods
char charAt(int i)
Returns the char value at the specified index.
int codePointAt(int i)
int codePointBefore(int i)
int codePointCount(int i, int j)
int compareTo(String s)
int compareToIgnoreCase(String s)
String concat(String s)
boolean contains(CharSequence cs)
boolean contentEquals(StringBuffer sb)
boolean contentEquals(CharSequence cs)
static String copyValueOf(char[] chars, int i, int j)
static String copyValueOf(char[] chars)
boolean endsWith(String s)
boolean equalsIgnoreCase(String s)
static String format(Locale l, String s, Object... objs)
static String format(String s, Object... objs)
byte[] getBytes(String s)
byte[] getBytes()
byte[] getBytes(Charset cs)
void getBytes(int srcBegin, int srcEnd, byte[] dst, int dstBegin)
void getChars(int i, int j, char[] chars, int k)
int indexOf(int i, int j)
int indexOf(String s)
int indexOf(int i)
int indexOf(String s, int i)
String intern()
boolean isEmpty()
static String join(CharSequence delimiter, CharSequence... elements)
static String join(CharSequence delimiter, Iterable<? extends CharSequence> elements)
int lastIndexOf(int i)
int lastIndexOf(String s, int i)
int lastIndexOf(String s)
int lastIndexOf(int i, int j)
int length()
Returns the length of this character sequence.
boolean matches(String s)
int offsetByCodePoints(int index, int codePointOffset)
boolean regionMatches(boolean b, int i, String s, int j, int k)
boolean regionMatches(int i, String s, int j, int k)
String replace(CharSequence cs1, CharSequence cs2)
String replace(char c1, char c2)
String replaceAll(String s1, String s2)
String replaceFirst(String s1, String s2)
String[] split(String s)
String[] split(String s, int i)
boolean startsWith(String s)
boolean startsWith(String s, int i)
CharSequence subSequence(int i, int j)
Returns a new CharSequence that is a subsequence of this sequence.
String substring(int i, int j)
String substring(int i)
char[] toCharArray()
String toLowerCase()
String toLowerCase(Locale l)
String toUpperCase(Locale l)
String toUpperCase()
String trim()
static String valueOf(boolean b)
static String valueOf(double d)
static String valueOf(char[] chars, int i, int j)
static String valueOf(float f)
static String valueOf(int i)
static String valueOf(char c)
static String valueOf(long l)
static String valueOf(Object o)
static String valueOf(char[] chars)
Inherited Methods
[Expand]
From class java.lang.Object
From interface java.lang.CharSequence
From interface java.lang.Comparable

Fields

public static final Comparator<String> CASE_INSENSITIVE_ORDER

Public Constructors

public String ()

public String (byte[] bytes)

public String (byte[] bytes, int hibyte)

public String (byte[] bytes, int offset, int count)

public String (byte[] bytes, int hibyte, int offset, int count)

public String (byte[] bytes, int i, int j, String s)

public String (byte[] bytes, int offset, int length, Charset charset)

public String (byte[] bytes, Charset cs)

public String (byte[] bytes, String s)

public String (char[] chars)

public String (char[] chars, int i, int j)

public String (int[] codePoints, int offset, int length)

public String (String s)

public String (StringBuffer sb)

public String (StringBuilder sb)

Public Methods

public char charAt (int i)

Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.

Parameters
i the index of the char value to be returned
Returns
  • the specified char value

public int codePointAt (int i)

public int codePointBefore (int i)

public int codePointCount (int i, int j)

public int compareTo (String s)

public int compareToIgnoreCase (String s)

public String concat (String s)

public boolean contains (CharSequence cs)

public boolean contentEquals (StringBuffer sb)

public boolean contentEquals (CharSequence cs)

public static String copyValueOf (char[] chars, int i, int j)

public static String copyValueOf (char[] chars)

public boolean endsWith (String s)

public boolean equalsIgnoreCase (String s)

public static String format (Locale l, String s, Object... objs)

public static String format (String s, Object... objs)

public byte[] getBytes (String s)

public byte[] getBytes ()

public byte[] getBytes (Charset cs)

public void getBytes (int srcBegin, int srcEnd, byte[] dst, int dstBegin)

public void getChars (int i, int j, char[] chars, int k)

public int indexOf (int i, int j)

public int indexOf (String s)

public int indexOf (int i)

public int indexOf (String s, int i)

public String intern ()

public boolean isEmpty ()

public static String join (CharSequence delimiter, CharSequence... elements)

public static String join (CharSequence delimiter, Iterable<? extends CharSequence> elements)

public int lastIndexOf (int i)

public int lastIndexOf (String s, int i)

public int lastIndexOf (String s)

public int lastIndexOf (int i, int j)

public int length ()

Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

Returns
  • the number of chars in this sequence

public boolean matches (String s)

public int offsetByCodePoints (int index, int codePointOffset)

public boolean regionMatches (boolean b, int i, String s, int j, int k)

public boolean regionMatches (int i, String s, int j, int k)

public String replace (CharSequence cs1, CharSequence cs2)

public String replace (char c1, char c2)

public String replaceAll (String s1, String s2)

public String replaceFirst (String s1, String s2)

public String[] split (String s)

public String[] split (String s, int i)

public boolean startsWith (String s)

public boolean startsWith (String s, int i)

public CharSequence subSequence (int i, int j)

Returns a new CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.

Parameters
i the start index, inclusive
j the end index, exclusive
Returns
  • the specified subsequence

public String substring (int i, int j)

public String substring (int i)

public char[] toCharArray ()

public String toLowerCase ()

public String toLowerCase (Locale l)

public String toUpperCase (Locale l)

public String toUpperCase ()

public String trim ()

public static String valueOf (boolean b)

public static String valueOf (double d)

public static String valueOf (char[] chars, int i, int j)

public static String valueOf (float f)

public static String valueOf (int i)

public static String valueOf (char c)

public static String valueOf (long l)

public static String valueOf (Object o)

public static String valueOf (char[] chars)