Substitution methods are valuable methods for supplanting content in a data string:
public static String quotereplacement(string mystr)
Gives back an exacting substitution String for the tagged String.
This method
creates a String that will function as an issue
substitution s in the
appendreplacement system for the Matcher class.
public Stringbuffer appendtail(stringbuffer strbuff)
Actualizes a terminal annex and-supplant step.
public Matcher appendreplacement(stringbuffer strbuff, String strsubstitution)
Actualizes a non-terminal annex and-supplant step.
public String replacefirst(string strsubstitution)
Replaces the first subsequence of the data succession
that matches the example
with the given substitution string.
public String replaceall(string strsubstitution)
Replaces each subsequence of the data succession that
matches the example with
the given substitution string.
Do'stlaringiz bilan baham: