![]() Validates if this string starts with the specified prefix from the specified index.Ĭonverts this string to a new character array. Validates if this string starts with the specified prefix.īoolean startsWith(String prefix, int toffset) It splits the string and returns the array of substrings that matches the given regular expression.Limits decides the length of the resulting array. Splits this string on the basis of matches of the given regular expression. Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar. ![]() String replace(char oldChar,char newChar) Replaces the first substring of this string that matches the given regular expression with the given replacement. String replaceFirst(String regex, String replacement) It replaces all the occurrences of substrings that fits the regular expression regex with the replacement string. String replaceAll(String regex, String replacement) It checks whether the String is matching with the specified regular expression regex.īoolean regionMatches(boolean ignoreCase, int srcoffset, String dest, int destoffset, int len)Īnother variation of regionMatches method with the extra boolean argument to specify whether the comparison is case sensitive or case insensitive. Returns the index within this string of the last occurrence of the specified substring. ![]() Returns the index within this string of the last occurrence of the specified character. Returns true if, and only if, length() is 0. Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index. Returns the index within this string of the first occurrence of the specified character. Returns the index within this string of the first occurrence of the specified substring. Only the specified range is being copied(srcBegin to srcEnd) to the dest subarray(starting fromdestBegin). It copies the characters of src array to the dest array. Void getChars(int srcBegin, int srcEnd, char dest, int destBegin) Tests if this string ends with the specified suffix.īoolean equalsIgnoreCase(String anotherString)Ĭompares this String to another String, ignoring case considerations.Įncodes this String into a sequence of bytes using the platform’s default charset, storing the result into a new byte array.Įncodes this String into a sequence of bytes using the given charset, storing the result into a new byte array. Returns true if and only if this string contains the specified sequence of char values.Ĭompares this string to the specified CharSequence.Returns true if matches, else false.Ĭompares this string to the specified StringBuffer.Returns true if matches, else false. Same as compareTo above, it just ignore cases.Īppends the specified string to the end of this string. The comparison is based on the Unicode value of each character in the strings.Ĭompare 2 strings. Returns the char value at the specified index.Index start from 0.Ĭompare 2 strings. Returns a new string after removing leading and trailing whitespaces. Returns a new string that is a substring of this string.Substring start from the specified beginindex upto endindex-1. Returns a new string that is a substring of this string.Substring start from the specified index It will return the length of this string. Returns the position within this string of the first occurrence of the specified substring ,starting from specified index. ![]() It compares one String with another string object. ![]()
0 Comments
Leave a Reply. |