views:

64

answers:

1

Hi there,

Simple request (hopefully) here.

I have a string which whilst it varies in length, will always need the last 6 characters removed.

Using a 3rd party web service, so I'm unable to edit the response in the XML before outputting.

If anyone can suggest a quick way of trimming them off i'd be really grateful!

here is the string i'll be using:

#daysEvent[iItem].XmlChildren[iEvent].XmlChildren[16].XmlText#

Thanks!

+10  A: 
Left(mystring, len(mystring)-6)
Nick
Great! I think my brain has melted due to the fact it's hot and it's Friday. Thanks for your help!
Simon Hume
It really is too bad that coldfusion does not support negative numbers in its string functions like many other languages do.
Nick
If enough people ask for it, it might get added - feature requests can be made here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
Peter Boughton