mid(string,x,y)

that will give you y character(s) starting at position x

If you want the 'n' out of the word 'center':

<cfset thestring = "center">
<cfset theletter = mid(thestring,3,1)>

Dave

-----Original Message-----
From: Christophe Maso [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 28, 2005 12:17 PM
To: CF-Talk
Subject: Get character in string at position X?


I can do this in Javascript, but I've been through the index of my CF book and 
haven't found the a CF function that will return the character at position X in 
a given string. (I tried treating the string as a list, using the listGetAt 
function and specifying "" as the delimiter, but CF balked at that...)  Can 
anyone help me out?  Thanks!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213144
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to