$DEPAD

From m204wiki
Revision as of 13:18, 20 April 2013 by Alex (talk | contribs) (Automatically generated page update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The $DEPAD function removes the designated characters from both sides of a specific string.

Syntax

$DEPAD(%string,%remove)

The %remove characters are removed from %string.

Examples:

if %STRING = '___ABC___' then PRINT $DEPAD(%STRING,'_')

results in ABC

if %STRING = 'XYZABCXYZ' then PRINT $DEPAD(%STRING,'XYZ')

also results in ABC

IF %STRING = '+A+B+C+' THEN PRINT $DEPAD(%STRING,'+')

results in A+B+C