Занятие 8. Справочник
Занятие 8. Справочник
Полезные функции класса Character
char | charValue() Returns the value of this Character object. |
int | compareTo(Character anotherCharacter) Compares two Character objects numerically. |
static int | digit(char ch, int radix) Returns the numeric value of the character ch in the specified radix. |
static char | forDigit(int digit, int radix) Determines the character representation for a specific digit in the specified radix. |
static boolean | isDigit(char ch) Determines if the specified character is a digit. |
static boolean | isHighSurrogate(char ch) Determines if the given char value is a high-surrogate code unit (also known as leading-surrogate code unit). |
static boolean | isLetter(char ch) Determines if the specified character is a letter. |
static boolean | isLetter(int codePoint) Determines if the specified character (Unicode code point) is a letter. |
static boolean | isLetterOrDigit(char ch) Determines if the specified character is a letter or digit. |
static boolean | isLetterOrDigit(int codePoint) Determines if the specified character (Unicode code point) is a letter or digit. |
static boolean | isLowerCase(char ch) Determines if the specified character is a lowercase character. |
static boolean | isLowerCase(int codePoint) Determines if the specified character (Unicode code point) is a lowercase character. |
static boolean | isUpperCase(char ch) Determines if the specified character is an uppercase character. |
static boolean | isUpperCase(int codePoint) Determines if the specified character (Unicode code point) is an uppercase character. |
static boolean | isWhitespace(char ch) Determines if the specified character is white space according to Java. |
static char | toLowerCase(char ch) Converts the character argument to lowercase using case mapping information from the UnicodeData file. |
String | toString() CReturns a String object representing this Character's value. |
static String | toString(char c) Returns a String object representing the specified char. |
static char | toUpperCase(char ch) Converts the character argument to uppercase using case mapping information from the UnicodeData file. |
Полезные функции класса String
char | charAt(int index) Returns the char value at the specified index. |
int | compareTo(String anotherString) Compares two strings lexicographically. |
int | compareToIgnoreCase(String str) Compares two strings lexicographically, ignoring case differences. |
boolean | cendsWith(String suffix) Tests if this string ends with the specified suffix. |
byte[] | getBytes() Encodes this String into a sequence of bytes using the platform's default charset, storing the result into a new byte array. |
int | indexOf(int ch) Returns the index within this string of the first occurrence of the specified character. |
int | indexOf(int ch, int fromIndex) Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index. |
int | indexOf(int ch, int fromIndex) Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index. |
int | indexOf(String str, int fromIndex) Returns the index within this string of the first occurrence of the specified substring, starting at the specified index. |
int | lastIndexOf(int ch) Returns the index within this string of the last occurrence of the specified character. |
int | lastIndexOf(int ch, int fromIndex) Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index. |
int | lastIndexOf(String str) Returns the index within this string of the rightmost occurrence of the specified substring. |
int | lastIndexOf(String str, int fromIndex) Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the specified index. |
int | length() Returns the length of this string. |
String | replace(char oldChar, char newChar) Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar. |
String | replace(CharSequence target, CharSequence replacement) Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence. |
String | replaceAll(String regex, String replacement) Replaces each substring of this string that matches the given regular expression with the given replacement. |
String | replaceFirst(String regex, String replacement) Replaces the first substring of this string that matches the given regular expression with the given replacement. |
String[] | split(String regex) Splits this string around matches of the given regular expression. |
boolean | startsWith(String prefix) Tests if this string starts with the specified prefix. |
boolean | startsWith(String prefix, int toffset) Tests if the substring of this string beginning at the specified index starts with the specified prefix. |
String | substring(int beginIndex) Returns a new string that is a substring of this string. |
String | substring(int beginIndex, int endIndex) Returns a new string that is a substring of this string. |
char[] | toCharArray() Converts this string to a new character array. |
String | toLowerCase() Converts all of the characters in this String to lower case using the rules of the default locale. |
String | toUpperCase() Converts all of the characters in this String to upper case using the rules of the default locale. |
String | trim() Returns a copy of the string, with leading and trailing whitespace omitted. |
static String | valueOf(boolean b) Returns the string representation of the boolean argument. |
static String | valueOf(char c) Returns the string representation of the char argument. |
static String | valueOf(double d) Returns the string representation of the double argument. |
static String | valueOf(float f) Returns the string representation of the float argument. |