Test for White Space

DESCRIPTION:

Tests whether strings consist of only white space.

USAGE:

is.all.white(x, empty=T) 

REQUIRED ARGUMENTS:

x
character vector or bdCharacter.

OPTIONAL ARGUMENTS:

empty
logical flag: if TRUE, the empty string ("") is considered white space.

VALUE:

logical vector or bdLogical of the same length as x, whose i'th element is TRUE if string x[i] consists of only white space. This is defined as any combination of spaces and/or tabs.

SEE ALSO:

, , .

EXAMPLES:

  str <- c("some string", " \t ", "")
  is.all.white(str) 
  # Prints:
  # [1] F T T 
  is.all.white(str, empty=F) 
  # Prints:
  # [1] F T F