Syntax: %copy(string,start,len)

return a portion of string, starting at character position start (the first character is position 1), and returning len characters. If len is missing, then the rest of the characters in the string are returned. If start is less than zero, then the start position is relative to the end of the string instead of the beginning.

Note: This is like the PHP substr function, except that TeSSH string positions start at one instead of zero.


#SHOW %copy("abcdef",2,3)
displays: bcd

#SHOW %copy("abcdef",2)
displays: bcdef

#SHOW %copy("abcdef",-1)

displays: f

Add comment

Login or register to post comments