StripAscii(string)
Last updated December 10, 2002
Version: 2 | Requires: CF5 | Library: StrLib
Description:
Strips all ASCII character codes from str.
Return Values:
Returns a string.
Example:
<CFSET str="This is&##155; a test™">
<CFOUTPUT>
Given str=#str#<BR>
Stripped: #StripAscii(str)#
</CFOUTPUT>
Parameters:
Name | Description | Required |
---|---|---|
string | String to be modified. | Yes |
Full UDF Source:
/**
* Removes ASCII character codes from the string.
*
* @param string String to be modified. (Required)
* @return Returns a string.
* @author Rob Brooks-Bilson (rbils@amkor.com)
* @version 2, December 10, 2002
*/
function StripAscii(str)
{
return REReplace(str, "&(##[0-9]{1,3}|[[:alpha:]]*[[:alnum:]]+);", "", "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