PDA

View Full Version : TRIM$ vs. TRIMFULL$



Petr Schreiber
22-09-2005, 20:50
Hi,

I don't understand diference in using TRIM$( justString$ ) and TRIMFULL$( justString$ ).
I thought that TRIMFULL$ will possibly remove such characters as $TAB, but it doesn't. It seems it removes just $SPC.

Thanks,
Psch

ErosOlmi
22-09-2005, 21:39
TRIM$ will remove chars from left and right.

TRIMFULL$ will remove spaces left, right and inside.

Try the following:



'
msgbox "[" & trimfull$(" 12345 abcg whatever string with spaces inside ") & "]"
'
'


You should get a string with no spaces on the left, on the right and more than 1 space inside the string will be stransformed to 1 space only.

Of course if I'm not wrong ;)

Ciao
Eros

Petr Schreiber
22-09-2005, 21:45
Quite handy function!

I like it. Could you just update info in help file, please? There's only


Return a copy of a string with leading and trailing characters or substrings removed


Sorry for the silly question, but what is considered leading and trailing characters or substrings ? Just spaces ? Substrings sounds like something related to discrimination :)

Thanks,
Psch

ErosOlmi
22-09-2005, 22:19
:D I will do!