Android examples for java.lang:String Strip
trim string from left
import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.text.Editable; import android.text.SpannedString; import android.util.Pair; public class Main{ public static String ltrim(String str, char target) { if (str.length() > 0 && str.charAt(str.length() - 1) == target) { str = str.substring(0, str.length() - 1); }/*w w w . java 2 s . com*/ return str; } }