removeEndSpaces(str)
Last updated March 07, 2010
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");
}
Search CFLib.org
Latest Additions
Raymond Camden added
QueryDeleteRows
November 04, 2017
Leigh added
nullPad
May 11, 2016
Raymond Camden added
stripHTML
May 10, 2016
Kevin Cotton added
date2ExcelDate
May 05, 2016
Raymond Camden added
CapFirst
April 25, 2016