Contents | Index | < Browse | Browse >
SUBSTR(<string>, <startpos>, [<length>],[<padchar>])
returns a string
The result is a string of <length> characters made up the characters in
<string> beginning at <startpos>.
If <length> is not specified, then all of the string to the right of
<startpos> will be returned. If the argument is specified, the returned
string will have <length> characters, filled out, if necessary, with
<padchar>.
The default pad character is a blank.
Example:
say substr('indifference',3,3); >>> dif
say substr('No way',4,5,'!') >>> way!!
Also see
Next: TRANSLATE() | Prev: STRIP() | Contents: String functions