Left(var,Len(var)-4)
Let's say var = Bahehehe
You End up with Bahe
Left gives x numbers of characters in var from the left, and Len(var)-4
tells it to get X numbers of character minus 4. that way, u get everything
except the last 4 numbers.
Bahehehehe!!
-----Original Message-----
From: Chad Gray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 12:56 PM
To: CF-Talk
Subject: trim a string variable
Is there a way to trim a string like : file.jpg
to : file
(aka knock off the last 4 characters)
<cfset newfilename = #left(File.ServerFile,4)#> Does not work because the
name of the file in the database could be longer then 4 characters
Is there a function that im missing to trim off the last 4 characters of a
variable?
Thanks
Chad
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists