11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

$ZSTRIPMask CodesEAPCNLUWStrip everything.Strip all alphabetic characters.Strip punctuation characters, including blank spaces.Strip control characters (0-31, 127-159).Strip numeric characters.Strip lowercase alphabetic characters.Strip uppercase alphabetic characters.Strip whitespaces ($C(9), $C(32), $C(160)).You can also place a Unary Not (') before a mask character to mean don't remove charactersof this type. All masks without a Unary Not must precede the masks with a Unary Not. Maskcodes can be specified as uppercase or lowercase characters.remcharAdditional characters to remove. For example, if you specified in the action parameter thatyou want to remove all numeric characters ("*N"), but also wanted to remove lowercase t,you would add the string “t” as the remchar parameter.keepcharSpecific characters not to remove. For example, if you specified that you wanted to removeall white spaces and alphabetic characters (*WA), but preserve uppercase M, you would addthe string “M” as the keepchar parameter.ExamplesThe following example creates a string, then strips out all alphabetic characters, except lowercasecharacters ('L). As a result, the string still contains the lowercase characters k, d, andp:SET str="kd p0932832 "_$CHAR(9)_"DD$#)($#J"WRITE $ZSTRIP(str,"*A'L")returns: kd p0932832 $#)($#The following example creates the same string, then strips out all white spaces and allalphabetic characters, except lowercase characters ('L). However, the example uses theremchar parameter to strip the lowercase d while preserving all other lowercase characters:<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 563

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!