nonemptystring - Maple Help

type/string

check for an object of type string

type/nonemptystring

check for a non-empty string

 Calling Sequence type(x, string) type(x, nonemptystring)

Parameters

 x - any expression

Description

 • The call type(x, string) checks to see if x is of type string. It returns true if x is of type string, and false otherwise.
 • The call type(x, nonemptystring) checks to see if x is of type string and x<>"".

Examples

 > $\mathrm{type}\left(1,\mathrm{string}\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{type}\left(\frac{1}{2},\mathrm{string}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(0.5,\mathrm{string}\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{type}\left("String",\mathrm{string}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left(\mathrm{Name},\mathrm{string}\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{type}\left({a}_{b},\mathrm{string}\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{type}\left(\frac{a}{b},\mathrm{string}\right)$
 ${\mathrm{false}}$ (7)
 > $\mathrm{type}\left("",\mathrm{string}\right)$
 ${\mathrm{true}}$ (8)
 > $\mathrm{type}\left("",\mathrm{nonemptystring}\right)$
 ${\mathrm{false}}$ (9)
 > $\mathrm{type}\left("String",\mathrm{nonemptystring}\right)$
 ${\mathrm{true}}$ (10)
 > $\mathrm{type}\left(1,\mathrm{nonemptystring}\right)$
 ${\mathrm{false}}$ (11)