StringTools - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Miscellaneous Utilities : StringTools/SubString

StringTools

  

SubString

  

extract a substring from a string

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

SubString( s, r )

Parameters

s

-

Maple string

r

-

range; specifies what substring to extract

Description

• 

The SubString(s, r) command returns a substring of string s specified by range r. A substring is a sequence of characters that occurs contiguously in the original string from which it is selected.

  

The range r must have integer endpoints. Range indexing for this function is similar to substring selection via the sa..b notation. For more information about range indexing, see selection.

• 

The main difference between Substring and the Maple built-in substring procedure is that, when presented with a symbol as the first argument, substring returns a symbol while SubString returns a string.

Examples

withStringTools:

SubStringabcdef,2..2

b

(1)

SubStringabcdef,3..5

cde

(2)

SubStringabcdef,3..5

cde

(3)

SubStringabcdef,5..3

bcd

(4)

See Also

selection

string

StringTools

StringTools[Drop]

StringTools[Map]

StringTools[Select]

StringTools[Take]

substring

type[string]

type[symbol]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam