How to remove the last character and add another in Coldfusion string
To remove the last character of a string or a list in coldfusion, below code snippet can be used:
<cfset str = "this is a string;">
<cfset str = left(str,len(str)-1)>
<cfset str = str & '-'>
<cfoutput>#str#</cfoutput>
Comments
Post a Comment