TRIMB function

Syntax

TRIMB (expression)

Description

Use the TRIMB function to remove all trailing spaces and tabs from expression. All other spaces or tabs in expression are left intact. If expression evaluates to the null value, null is returned.

If NLS is enabled, you can use TRIMB to remove white space characters such as Unicode values 0x2000 through 0x200B, 0x00A0, and 0x3000, marked as TRIMMABLE in the NLS.LC.CTYPE file entry for the specified locale.

Example

A="  THIS IS A  SAMPLE STRING  "
PRINT "'":A:"'": " IS THE STRING"
PRINT "'":TRIMB(A):"'":" IS WHAT TRIMB DOES"
END

This is the program output:

'  THIS IS A  SAMPLE STRING  ' IS THE STRING
'  THIS IS A  SAMPLE STRING' IS WHAT TRIMB DOES