Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
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

AltStyle によって変換されたページ (->オリジナル) /