Android examples for java.lang:String Escape
encode Space in a string to %20
import android.location.Location; import java.math.BigDecimal; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.text.DecimalFormat; import java.text.NumberFormat; public class Main{ public static String encodeSpace(String s) { return s.replaceAll(" ", "%20"); }//from w w w .j a va 2s .com }