StringTools
HasSpace
determine if a string has any space characters
Calling Sequence
Parameters
Description
Thread Safety
Examples
HasSpace(s)
s
-
string; string to test
The HasSpace(s) command determines whether s has any space characters.
A space character is any one of the following:
Space Character
Meaning
ASCII Code
`` ''
space
32
``\t''
horizontal tab
9
``\n''
new line
10
``\r''
carriage return
13
``\f''
form feed
12
``\v''
vertical tab
11
If s is a space character, HasSpace returns true. Otherwise, false is returned.
All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters. Thus, there is no support for multibyte character encodings, such as unicode encodings.
The StringTools[HasSpace] command is thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.
with⁡StringTools:
HasSpace⁡foobar
false
HasSpace⁡foo bar
true
HasSpace⁡foo\tbar
HasSpace⁡foo\nbar
See Also
convert
length
string
StringTools[HasASCII]
StringTools[HasControlCharacter]
StringTools[IsSpace]
StringTools[Select]
Download Help Document