Any List type function will server you well here...

<cfset myList = "�562.50�562.50�587.50�562.50�445.00">

<cfdump var="#ListGetAt(myList,3,"�")#">

[for example]




 

-----Original Message-----
From: James Buckingham [mailto:[EMAIL PROTECTED] 
Sent: 15 January 2004 12:35
To: '[EMAIL PROTECTED]'
Subject: [ cf-dev ] NEWBIE - Dividing a string by a particular character

Hi there,
 
I'm currently working on my very first Cold Fusion project and I've hit a
bit of a stumbling block; so I was wondering if any of you veterans out
there could help me out :). I'm sure this is very simple!!!
 
I have a field in my DB called fares which contains a single string in each
of the records. The string looks something like this:
 
�562.50�562.50�587.50�562.50�445.00
 
Each fare is to correspond with a date which is stored in exactly the same
way. I've managed to split the date up ok as this is a set number of 8
characters but the prices could vary a lot so I'm needing to split it up by
the � character. I've been looking at the left,mid and right functions but
I've not managed to find anything on how to implement it in this particular
way. Can anyone point me in the right direction?
 
Cheers in advance,
JamesB
This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions.
Visit our website at http://www.reedexpo.com

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to