Java String Trim Left ltrim(String str)

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

Description

ltrim

License

Open Source License

Declaration

public static String ltrim(String str) 

Method Source Code

//package com.java2s;
/*/* w  w w .j  av  a 2 s.c  o m*/
 * M2M ServiceFOTA ONM version 1.0
 *
 *  Copyright ? 2014 kt corp. All rights reserved.
 *
 *  This is a proprietary software of kt corp, and you may not use this file except in
 *  compliance with license agreement with kt corp. Any redistribution or use of this
 *  software, with or without modification shall be strictly prohibited without prior written
 *  approval of kt corp, and the copyright notice above does not evidence any actual or
 *  intended publication of such software.
 */

public class Main {

    public static String ltrim(String str) {

        int index = 0;
        while (' ' == str.charAt(index++))
            ;
        if (index > 0)
            str = str.substring(index - 1);
        return str;
    }
}

Related

  1. ltrim(String source)
  2. ltrim(String source)
  3. ltrim(String source)
  4. ltrim(String src, char ch, int nLen)
  5. ltrim(String str)
  6. ltrim(String str)
  7. ltrim(String str)
  8. ltrim(String str, String charList)
  9. ltrim(String str, String defaultValue)