-
-
Notifications
You must be signed in to change notification settings - Fork 18
ord
Matěj Štágl edited this page Dec 25, 2018
·
11 revisions
Returns unicode value of a single character in a string.
ord(ch)
Argument | Description |
---|---|
char ch |
A character to be converted |
Returns: int
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
.
int value = ord('A'); // returns 65
value = ord('A'); // 66
Back to strings