CFLib.org – Common Function Library Project

removeEndSpaces(str)

Last updated March 6, 2010

author

Nick Giovanni

Version: 2 | Requires: CF5 | Library: StrLib

Description:
strips all graph characters (spaces, tabs, line breaks) off the end of a string.

Return Values:
Returns a string.

Example:

#removeEndSpaces("My text string. #chr(9)# #chr(9)# #chr(13)##chr(10)# #chr(13)##chr(10)#")#

Parameters:

Name Description Required
str String to parse. Yes

Full UDF Source:

/**
 * strips all graph characters (spaces, tabs, line breaks) off the end of a string.
 * Version 2 by Raymond Camden
 * 
 * @param str 	 String to parse. (Required)
 * @return Returns a string. 
 * @author Nick Giovanni (ngiovanni@gmail.com) 
 * @version 2, March 6, 2010 
 */
function removeEndSpaces(str) {
	return reReplace(str,"\s*$","","all");
 }
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson