asc

Synopsis

$ asc("c")

Returns a scalar integer of the ascii value of the specified character

Parameters

"c" - the character to get the ascii value of.

Returns

A scalar integer with an ascii value.

Examples

$string = "abcDEF"; for ($x = 0; $x < strlen($string); $x++) { $char = charAt($string, $x); $asc = asc($char); println("$char = $asc"); }

a = 97 b = 98 c = 99 D = 68 E = 69 F = 70

See Also