Java String Trim Left ltrim(final String str, final char filler)

Here you can find the source of ltrim(final String str, final char filler)

Description

Performs left trim

License

Open Source License

Parameter

Parameter Description
str a parameter
filler a parameter

Declaration

public static String ltrim(final String str, final char filler) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from ww  w. j  a  v  a2  s  . c  o  m
     * Performs left trim
     * 
     * @param str
     * @param filler
     * @return
     */
    public static String ltrim(final String str, final char filler) {
        // TODO: Performasi arttirilmali!!
        if (str == null)
            return null;
        for (int i = 0; i < str.length(); ++i) {
            if (str.charAt(i) != filler) {
                return str.substring(i);
            }
        }
        return "";
    }
}

Related

  1. leftTrim(StringBuilder pStringBuilder)
  2. leftTrimSlashes(String s)
  3. ltrim(byte[] a)
  4. ltrim(CharSequence str)
  5. ltrim(final String str)
  6. ltrim(final String text)
  7. lTrim(final String value)
  8. ltrim(String list, char[] del)
  9. ltrim(String orig)