Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing set number of characters from end of string with ColdFusion

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!

like image 952
Simon Hume Avatar asked Jun 25 '10 15:06

Simon Hume


1 Answers

Left(mystring, len(mystring)-6)
like image 103
Nick Van Brunt Avatar answered Oct 27 '22 00:10

Nick Van Brunt