Match or replace a string

ReturnMethodSummary
booleanmatches(String regex)Tells whether or not this string matches the given regular expression.
booleanregionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)Tests if two string regions are equal.
booleanregionMatches(int toffset, String other, int ooffset, int len)Tests if two string regions are equal.
Stringreplace(char oldChar, char newChar)Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
Stringreplace(CharSequence target, CharSequence replacement)Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence.
StringreplaceAll(String regex, String replacement)Replaces each substring of this string that matches the given regular expression with the given replacement.
StringreplaceFirst(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.
String[]split(String regex, int limit)Splits this string around matches of the given regular expression.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.