Loading ...
Sorry, an error occurred while loading the content.
 

removing spaces from a variable

Expand Messages
  • Don - HtmlFixIt.com
    if I have a variable, say ^%arrayelement3% and I want to strip all leading and trailing spaces ... so if the variable was this I want to get this .
    Message 1 of 2 , Jan 31, 2009
      if I have a variable, say ^%arrayelement3% and I want to strip all
      leading and trailing spaces ...

      so if the variable was " this " I want to get "this".

      And if it is " this two or more word variable " I want to get
      "this two or more word variable".

      I cannot just strip all spaces because I want the spaces between the words.
    • Don - HtmlFixIt.com
      ... I think I ll try this ... ^$StrTrim( Str )$ Removes blank spaces from the start and end of the specified value. Example: ^$StrTrim( some text )$
      Message 2 of 2 , Jan 31, 2009
        Don - HtmlFixIt.com wrote:
        > if I have a variable, say ^%arrayelement3% and I want to strip all
        > leading and trailing spaces ...
        >
        > so if the variable was " this " I want to get "this".
        >
        > And if it is " this two or more word variable " I want to get
        > "this two or more word variable".
        >
        > I cannot just strip all spaces because I want the spaces between the words.

        I think I'll try this ...
        ^$StrTrim("Str")$

        Removes blank spaces from the start and end of the specified value. Example:
        ^$StrTrim(" some text ")$ returns "some text"

        I sure love notetab!
      Your message has been successfully submitted and would be delivered to recipients shortly.