charToNum | |||||||
Type | function | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Returns the ASCII value of a character. | ||||||
Introduced | 1.0 | ||||||
Changes | The ability to handle Unicode characters was introduced in version 2.0. In previous versions, it was not possible to pass a Unicode character to the charToNum function. | ||||||
Deprecated | 7.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: inverse, character, integer Operator: div Property: extendKey, RTFText, HTMLText, unicodeText, useUnicode Function: nativeCharToNum, numToCodepoint, numToChar, uniDecode, byteToNum, numToByte, mouseCharChunk, numToNativeChar, md5Digest, clickChar, format, URLDecode, codepointToNum Glossary: property, numeric, ASCII, return, Windows, character set, Mac OS, ISO 8859, Unix Control Structure: function | ||||||
Description | Use the charToNum function to rank characters in their numerical order.
The charToNum function is the inverse of the numToChar function. For special characters (those typed using the Option key or Alt key), the value returned by the charToNum function depends on the character set currently in use. On Mac OS systems this is normally the Macintosh character set; on Unix systems, this is normally ISO 8859; on Windows systems, this is usually Code Page 1252, a variant of ISO 8859. If the useUnicode property is set to true, you can specify a double-byte character. If the useUnicode is false and you specify a double-byte character, the charToNum function returns the numeric value of the character div 256. | ||||||
Tags | text processing |