HasSpace - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


StringTools

  

HasSpace

  

determine if a string has any space characters

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Calling Sequence

HasSpace(s)

Parameters

s

-

string; string to test

Description

• 

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.

Thread Safety

• 

The StringTools[HasSpace] command is thread-safe as of Maple 15.

• 

For more information on thread safety, see index/threadsafe.

Examples

withStringTools:

HasSpacefoobar

false

(1)

HasSpacefoo bar

true

(2)

HasSpacefoo\tbar

true

(3)

HasSpacefoo\nbar

true

(4)

See Also

convert

length

string

StringTools

StringTools[HasASCII]

StringTools[HasControlCharacter]

StringTools[IsSpace]

StringTools[Select]