Android examples for java.lang:String Replace
decode String by replacing < > ' " &
import android.text.TextUtils; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Random; import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main{ public static String decodeString(String strData) { if (strData == null) { return ""; }/*from w ww . j a v a 2s.c o m*/ return strData.replaceAll("<", "<").replaceAll(">", ">") .replaceAll("'", "'").replaceAll(""", "\"") .replaceAll("&", "&"); } }