Java String Starts Wtih startsWithSpaces(final String text)

Here you can find the source of startsWithSpaces(final String text)

Description

starts With Spaces

License

Open Source License

Declaration

private static boolean startsWithSpaces(final String text) 

Method Source Code

//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);
    }
}

Related

  1. startsWithSeparator(String str)
  2. startsWithSeveralUpperCaseLetters(String string)
  3. startsWithSlash(String path)
  4. startsWithSlash(String url)
  5. startsWithSpace(String s)
  6. startsWithTag(String html, int position)
  7. startsWithUppercase(String str)
  8. startsWithUpperCase(String text)
  9. startsWithURIScheme(String arg)