java remove white space at the beginning of string

java remove white space at the beginning of string
/**
 * @author lautturi.com 
 * Java example: remove white space at the beginning of string in java
 */

import java.util.*;

public class Lautturi {

	public static void main(String[] args) {

		String str = "   hello lautturi java world   ";
		
		System.out.println(str);
		str = str.replaceAll("^\\s+","");
		System.out.println(str);
	}
}
Source:w‮w‬w.lautturi.com

output:

output:

   hello lautturi java world   
hello lautturi java world
Created Time:2017-09-28 17:19:22  Author:lautturi