One way, if you can use createObject is

<cfset strUrl = "www.domain.com/dir1/dir2" />
<cfset jstr = CreateObject( "java", "java.lang.String" ).Init(strUrl) />
<cfset intLastIndex = jstr.LastIndexOf(JavaCast( "string", "/" )) />
<cfset myStr = mid(strUrl,1,intLastIndex+1) />



On Fri, Sep 12, 2008 at 11:39 AM, Colin Eyo <[EMAIL PROTECTED]> wrote:
> Is there a coldfusion method() to trim a string up to a specific character?
>
> Example: "www.domain.com/dir1/dir2" should be returned as 
> "www.domain.com/dir1/"
>
> -C
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3969
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to