The TRIMx procedures return a text string that has had the trailing or
leading characters (trim-pattern) removed from the string.
The TRIMx procedures should be used when more than a
single
character is to be trimmed off the start or end of a character string. The
benefit of using TRIML or TRIMR over the %TRIML and %TRIMR built-in functions is
their ability to trim multiple characters simultaneously.
trimmed-value TRIMx(
szOrgString 4096A Const Varying
szTrimPattern 256A Const Varying
)
|
|
|
Parameters
- szOriginalString
- [input VChar(4096) const] This parameter can be any character
variable up to a length of 4096 characters. The value can be variable or
fixed-length character. The field specified for this parameter is not changed,
but a copy of it is trimmed and returned to the caller as the procedure's
return value.
- szTrimPattern
- [input VChar(256) const] Specify any number of characters to trim
off the start or end of the szOrgString parameter value. Specify a field or
literal value for this parameter. Remember when passing a fixed-length
character field that trailing blanks in the field will be used as trim
characters. It is a good idea to trim this input value when the field is not
filled characters.
-
-