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

Popular posts from this blog

how to add new line in google form questions | Fix for next line issue in google form questions

How to add new line in the 'add title and description' section in google forms