/*--- XTRIM --------- MSDOS/PCDOS/DOSBOX/DOSEMU/Unix/Linu ------------*/
/* Removes Rightmost n characters 2005 - Mark McDonald */
/* T = XTRIMR("one--",2) returns "one" */
/*--------------------------------------------------------------------*/
XTRIMR: PROCEDURE
PARSE ARG X, N
IF LENGTH(X) - 1 >= N THEN
XR = LEFT(X,LENGTH(X) - N)
ELSE
XR = X
RETURN (XR)
/*--- XTRIM --------- MSDOS/PCDOS/DOSBOX/DOSEMU/Unix/Linu ------------*/
/* Removes Leftmost n characters 2005 - Mark McDonald */
/* T = XTRIML("--ONE",2) returns "ONE" */
/*--------------------------------------------------------------------*/
XTRIML: PROCEDURE
PARSE ARG X, N
IF LENGTH(X) - 1 >= N THEN
XR = RIGHT(X,LENGTH(X) - N)
ELSE
XR = X
RETURN (XR)
/*--------------------------------------------------------------------*/