next | previous | forward | backward | up | top | index | toc | home

substring -- extract part of a string

Description

substring(i,n,s) -- yields the substring of the string s starting at position i with length n.

substring(i,s) -- yields the substring of s starting at position i and continuing to the end of s.

Positions are numbered starting at 0.

If the starting position i is negative, it means to start from the end of the string.

Requests for character positions out of bounds are silently ignored.

In an older version of the program the string argument was placed first; the old way will still work.

Ways to use substring :