numToNativeChar

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the numToNativeChar of <ASCIIValue>
numToNativeChar(<ASCIIValue>)
Summary

Returns the native character corresponding to an ASCII value.

Introduced7.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
ASCIIValue

An integer between 0 and 255, representing a character in the native character set.

Example
put numToNativeChar(65) -- returns A
put numToNativeChar(0) -- returns the null character, ASCII zero
Values
NameTypeDescription
return

The numToNativeChar function returns a single native character.

RelatedFunction: nativeCharToNum, numToChar, charToNum, codepointToNum, numToCodepoint
Description

Use the numToNativeChar function to translate numbers into their native character equivalents.

The numToNativeChar function is the inverse of the nativeCharToNum function.

These functions convert between text and native characters and are replacements for the deprecated numToChar and charToNum functions.

As the “native” character sets for each platform have a limited and different repertoire, these functions should not be used when preservation of Unicode text is desired. Any characters that cannot be mapped to the native character set are replaced with a question mark character (‘?’).

Unless needed for compatibility reasons, it is recommended that you use the numToCodepoint and codepointToNum functions instead.