ascii

Determines the ASCII value of a character.

ascii(string) → returns numeric

This function requires BoxLang 1.0.0 and up.  Not supported on Lucee, Adobe ColdFusion, etc.

Argument Reference

string string
Required

Compatibility

BoxLang:

Version 1.0.0+ asc is transpiled to ascii in CFML files

Examples
Sample code invoking the ascii function

x = chr( 8361 ); 
 writeoutput( 'character: #x#' ); 
 x = asc( x ); 
 writeoutput( '<br>Unicode value: #x#');

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub