Removing space space in a string

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Removing space space in a string

Postby arjfca » 14 Sep 2011

Hello

I got a blank

Is there a function to remove space at the beginning of a string like trim or Clean in Excel?

Martin

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Removing space space in a string

Postby TJ » 14 Sep 2011

Hello

I got a blank

Is there a function to remove space at the beginning of a string like trim or Clean in Excel?

Martin
Press [F1] and you will see
all of the string-related keywords at your disposal:

Image
Attachments
string.jpg
(13.36 KiB) Downloaded 446 times

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Removing space space in a string

Postby TJ » 14 Sep 2011

the logic:

1. find out the string length

2. check to see if the left-most character is a " "

3. remove the " " by copying the right-most number of characters from the string.

Hope this helps.


Return to “MultiCharts”