remove/trim spaces

trafford69

New Member
Hi,

I have a problem. How do i remove/trim spaces in progress?
example if my data vary between 6 or 7 characters. Any samples? Thanks.:)
 
Use the trim function:
Code:
DEFINE VARIABLE a AS CHARACTER  NO-UNDO.
ASSIGN a = 'abcdefg            '.
MESSAGE a length(a) length(trim(a))
    VIEW-AS ALERT-BOX INFO BUTTONS OK.

The default character which is trimmed is blank, as a second parameter you can give another then the default character to trim.

HTH,

Casper.
 
Back
Top