Problem with Trim Function
Hello all.
I'm trying to trim a variable call $Output, that contains a string, that ends with a bunch of \r\n commands like this: "Bla bla bla \r\n \r\n \r\n \r\n \r\n "
Depending on the conditions, there may be lots of these \r\n commands. The $Output variable is being sent into a Text box control within a custom page, that’s why I have to use the \r\n instead of $\r$\n.
I have tried adding the below lines (;added) to the Trim function (both TrimRight and TrimLeft parts) from the archive, but it did not help.
Loop2:
StrCpy $R2 "$R1" 1 -1
StrCmp "$R2" " " TrimRight
StrCmp "$R2" "$\r" TrimRight
StrCmp "$R2" "$\n" TrimRight
StrCmp "$R2" "\r" TrimRight ;added
StrCmp "$R2" "\n" TrimRight ;added
StrCmp "$R2" " " TrimRight ; this is a tab
GoTo Done
Any thoughts would be appreciated. Thanks!