Skip to content
Matěj Štágl edited this page Dec 25, 2018 · 11 revisions

ord

Returns unicode value of a single character in a string.

Syntax:

ord(ch)
Argument Description
char ch A character to be converted

Returns: int

Description:

This function takes a single character and return its Unicode value. You can use this function to store integers of key presses. Function is identical to cast of char to int.

Example :

int value = ord('A'); // returns 65
value = ord('A'); // 66

Back to strings

Clone this wiki locally