Android examples for java.lang:String Starts or Ends
add Suffix to string
import android.annotation.SuppressLint; import java.io.UnsupportedEncodingException; import java.util.regex.Pattern; public class Main{ public static String addSuffix(String src, String suffix) { if (src == null || suffix == null) { return src; }/*from ww w. jav a 2s .co m*/ StringBuilder sb = new StringBuilder(); sb.append(src); sb.append(suffix); return sb.toString(); } }