ccEscape(ccnum)
Last updated September 20, 2004
Version: 1 | Requires: ColdFusion 5 | Library: StrLib
Description:
Escapes a credit card number, showing only the last 4 digits. The other digits are replaced with the * character.
Return Values:
Returns a string.
Example:
<cfoutput>#ccEscape(creditcard)#</cfoutput>
Parameters:
| Name | Description | Required |
|---|---|---|
| ccnum | Credit card number you want to escape. | Yes |
Full UDF Source:
<cfscript>
/**
* Escapes a credit card number, showing only the last 4 digits. The other digits are replaced with the * character.
*
* @param ccnum Credit card number you want to escape. (Required)
* @return Returns a string.
* @author Joshua Miller (josh@joshuasmiller.com)
* @version 1, September 20, 2004
*/
function ccEscape(ccnum){
return "#RepeatString("*",val(Len(ccnum)-4))##Right(ccnum,4)#";
}
</cfscript>
Search CFLib.org
Latest Additions
Raymond Compton added
structBlend
20 day(s) ago
Duncan added
IsZIPUK
20 day(s) ago
Todd Sharp added
getTagContentAll
26 day(s) ago
Gerald Guido added
ListReturnDuplicat...
1 month(s) ago
Gerald Guido added
ListReturnDuplicat...
1 month(s) ago