STRIP: Removing a Character From a String

How to:

The STRIP function removes all occurrences of a specific character from a string. The resulting character string has the same length as the original string but is padded on the right with spaces.


Top of page

x
Syntax: How to Remove a Character From a String
STRIP(length, source_string, char, output)

where:

length

Integer

Is the number of characters in source_string and output.

source_string

Alphanumeric

Is the string from which the character will be removed.

char

Alphanumeric

Is the character to be removed from the string. If more than one character is provided, the left-most character will be used as the strip character.

Note: To remove single quotation marks, use two consecutive quotation marks. You must then enclose this character combination in single quotation marks.

output

Alphanumeric



Example: Removing Occurrences of a Character From a String

STRIP removes all occurrences of a period (.) from DIRECTOR and stores the result in a field with the format A17:

STRIP(17, DIRECTOR, '.', 'A17')

For ZEMECKIS R., the result is ZEMECKIS R.

For BROOKS J.L., the result is BROOKS JL.


iWay Software