Android String Whitespace Check isWhitespace(int c)

Here you can find the source of isWhitespace(int c)

Description

Tests if a code point is "whitespace" as defined in the HTML spec.

Parameter

Parameter Description
c code point to test

Return

true if code point is whitespace, false otherwise

Declaration

public static boolean isWhitespace(int c) 

Method Source Code

//package com.java2s;

public class Main {
    /**/* w  w w  . j  ava 2s  . c  o m*/
     * Tests if a code point is "whitespace" as defined in the HTML spec.
     * 
     * @param c
     *            code point to test
     * @return true if code point is whitespace, false otherwise
     */
    public static boolean isWhitespace(int c) {
        return c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r';
    }
}

Related

  1. isWhitespace(String text)
  2. isWhitespace(int c)