isWhitespace()

Test for whitespace characters starting at the beginning of a string.

This function is valid in v2.0.0 to v2.12.0. This function has been downloaded 14 times.

Parameters

{string} str
The string to be tested.
{boolean=} opt_onlyCheckStart Optional, Default:false
If true, only the beginning of the string is checked to see if it starts with a whitespace character. If false, all of the string is checked to see if it only contains whitespace characters.

Returns

{boolean}
Returns true if opt_onlyCheckStart is true-ish and str starts with a whitespace character or if opt_onlyCheckStart is false-ish and str only contains whitespace characters. Otherwise false is returned.

Required Function

This function requires the following function which is included automatically:

  • isRegExpMatch()
    Determine whether or not a RegExp matches an entire string (or the start of a string).