Link to home
Start Free TrialLog in
Avatar of nachtmsk
nachtmskFlag for United States of America

asked on

How to remove leading spaces from String in Cold Fusion

Hi,
I need to remove Leading spaces from a string in Cold Fusion. I've searched online and found examples for how to remove all spaces from a string, but what I need is to just remove the leading spaces.
In Perl this is simple, but I'm struggling here in CF.
Thanks!
Nacht
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nerkoni
nerkoni

#Trim(FORM.myText)#

You also have 2 functions to accomplish this:

#LTrim(FORM.myText)# for leading spaces and #RTrim(FORM.myText)#  for trailing spaces.