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

# Online Help

###### All Products    Maple    MapleSim

MmaTranslator[Mma]

 StringPosition
 return a list of the starting and ending character positions

 Calling Sequence StringPosition(arguments)

Parameters

 arguments - Maple translation of the Mathematica command arguments

Description

 • The StringPosition command returns a list of the starting and ending character positions at which a specified string appears as a substring.

Examples

 > $\mathrm{with}\left({\mathrm{MmaTranslator}}_{\mathrm{Mma}}\right):$

Use the command with the Maple translation.

 > $\mathrm{StringPosition}\left("abccbaaccbbaa","cc"\right)$
 $\left[\left[{3}{,}{4}\right]{,}\left[{8}{,}{9}\right]\right]$ (1)

Alternatively, you can use the FromMma command with the evaluate option specified.

 > $\mathrm{with}\left(\mathrm{MmaTranslator}\right):$
 > $\mathrm{FromMma}\left(\mathrm{StringPosition\left["abccbaaccbbaa", "cc"\right]},\mathrm{evaluate}\right)$
 $\left[\left[{3}{,}{4}\right]{,}\left[{8}{,}{9}\right]\right]$ (2)

 See Also