Page 1 of 1

[Implemented] Trim(), LTrim() and RTrim()

Posted: Fri Mar 25, 2005 4:03 pm
by Psychophanta
Should be very useful if these functions allow an optional parameter to tell what char to trim (not only spaces).
Result$ = Trim(String$ [, Character$])
Result$ = LTrim(String$ [, Character$])
Result$ = RTrim(String$ [, Character$]) :)

Posted: Fri Mar 25, 2005 4:43 pm
by dell_jockey
Yes, and take that idea one step further, please: let this extra parameter be of type array[], so that it can contain characters (plural) to trim. Also, in this case one could imagine predefined arrays, for instance one that contains all whitespace chars, one that contains all ASCII control sequences, one that..... etc.

Posted: Fri Mar 25, 2005 5:53 pm
by dracflamloc
Thats a good idea...except that you can't pass arrays

Posted: Sat Mar 26, 2005 6:49 am
by Rescator
Sure you can. You just pass the array pointer, nothing to it.

Posted: Sat Mar 26, 2005 10:08 pm
by filperj
And a string is an array of characters.

Code: Select all

 Result$ = Trim(String$ [, "The characters I want to remove"])