Trim() question!

Hi

Based on documentation:

if my texto has, for exemple:
" mytext" // with spaces on left
or
" mytext" // with tab on left

my line of code should remove any tabs or spaces on left and right of a line, write?
texto=texto.Trim(Chr(9),Chr(32))

and return only “mytext”…

my source:

my result after:

I bet Trim only considers the string as a whole, not as individual lines. You’ll probably have to break the string into lines and process each line with Trim.

1 Like