Here you can find the source of startsWithSpaces(final String text)
private static boolean startsWithSpaces(final String text)
//package com.java2s; /****************************************************************************** * Copyright (c) 2015 Oracle// w w w . j av a 2s .c om * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Ling Hao - initial implementation and ongoing maintenance * Konstantin Komissarchik - [333782] Problems in whitespace handling ******************************************************************************/ public class Main { private static boolean startsWithSpaces(final String text) { final char ch = text.charAt(0); return Character.isWhitespace(ch); } }