ord#

Synopsis#

$code = ord("A");       # 65
$code = ord("☺");      # 9786

Description#

Returns the Unicode code point of the first character of a string.

Returns the code point of the first character. For an empty string, returns 0. Multi-character strings return only the first character’s code point.

See also#

chr