.hd substr "take a substring of a string" 02/22/82 substr .ds 'Substr' is similar in function to the PL/I substr function; it prints on standard output a specified substring of its third argument. The substring printed is taken from starting at position and continuing for characters, or until the end of is reached. If is negative, the starting position is - characters from the end of . If is negative, characters are extracted from right to left. .sp 'Substr' is perhaps excessively general; for common problems, the 'take' and 'drop' commands will usually suffice. .es substr 1 2 [date] substr [start] [len] [full_name] set last_five = [substr -5 5 [variable]] .sa take (1), drop (1), rot (1), substr (2), stake (2), sdrop (2)