Java String Trim Left ltrim(String s)

Here you can find the source of ltrim(String s)

Description

ltrim

License

Apache License

Declaration

public static String ltrim(String s) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static String ltrim(String s) {
        int len = s.length();
        int st = 0;
        char[] val = s.toCharArray();

        while ((st < len) && (val[st] <= ' ')) {
            st++;/*from w w  w  .j  a va 2s  . co  m*/
        }
        return (st > 0) ? s.substring(st, len) : s;
    }
}

Related

  1. ltrim(final String text)
  2. lTrim(final String value)
  3. ltrim(String list, char[] del)
  4. ltrim(String orig)
  5. ltrim(String pString)
  6. ltrim(String s)
  7. ltrim(String s)
  8. ltrim(String s)
  9. ltrim(String s)