Str2Asc
- Last UpdatedOct 29, 2026
- 1 minute read
This function converts a character to its corresponding Unicode character code.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
Str2Asc |
String |
Synchronous |
Yes |
Supported |
Supported |
Supported (see Notes below) |
Supported |
Supported |
Syntax
Str2Asc(strChar)
strChar
The character to be converted.
Returned value
Returns the Unicode character code (in decimal) for the specified character.
Notes
The name of this function, which implies it only supports ASCII characters, is a legacy of previous versions of the software. The current version supports the full Unicode character set.
When this function is used in a project running on IoT View, it supports only single-byte Unicode characters (up to U+007F). Multi-byte Unicode characters are not supported at this time.
Examples
|
Tag Name |
Expression |
|---|---|
|
Tag |
Str2Asc("C") // Returned value = 67 |
|
Tag |
Str2Asc("o") // Returned value = 111 |