Author Topic: trim a string variable  (Read 1663 times)

guest

  • Guest
trim a string variable
« on: May 12, 2009, 05:50:24 PM »
In strategy ,i have a string variable from which i want to remove all blank spaces. Is there a IRD function whch does that ? Something like trim[] function.

guest

  • Guest
Re: trim a string variable
« Reply #1 on: May 12, 2009, 05:56:42 PM »
  • Best Answer
  • The space can be at any point of string variable -start /end/in between

    Offline bogdan

    • Jr. Member
    • **
    • Posts: 94
    • Karma: 0
    Re: trim a string variable
    « Reply #2 on: May 12, 2009, 06:01:39 PM »
  • Best Answer
  • Try something like this: StrReplace[test_string,' ','']

    As you can see it works for me:
        _I_I_015201afa1e16e60 [09:04] ASSIGN: test_string(LOCAL) <- STRING: hello there send by mielu
        _I_I_015201afa1e16e60 [09:04] ASSIGN: test_string(LOCAL) <- STRING: hellotheresendbymielu
    11:59:45.300 Int 22000 test_string after is: hellotheresendbymielu

    Regards