Android String Contain checkContainSpace(final String x)

Here you can find the source of checkContainSpace(final String x)

Description

Check string for containing space.

License

Apache License

Parameter

Parameter Description
x the string value for checking

Return

true, if string not null and not contain space

Declaration

public static boolean checkContainSpace(final String x) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /** The Constant SPACE. */
    private static final String SPACE = " ";

    /**//  w  w w. j a  v a  2  s  .  c  o  m
     * Check string for containing space.
     * 
     * @param x
     *            the string value for checking
     * @return true, if string not null and not contain space
     */
    public static boolean checkContainSpace(final String x) {
        return !(x != null && x.contains(SPACE));
    }
}

Related

  1. contains(String str1, String str2)
  2. containsCharRef(String s)
  3. contains(final CharSequence seq, final CharSequence searchSeq)
  4. containCount(String str, String searchStr)
  5. contains(String str, String searchStr)