The sub-string function will retrieve a portion of a string from another string.
Syntax
(sub-string <integer-expression> <integer-expression> <string-expression>)
where the first argument, counting from one, must be a number marking the beginning position in the string and the second argument must be a number marking the ending position in the string. If the first argument is greater than or equal to the second argument, a null string is returned.
Example
CLIPS> (sub-string 3 8 "abcdefghijkl") "cdefgh" CLIPS>