codepointProperty

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
codepointProperty(<unicodeCodepoint>, <propertyName>)
Summary

Retrieves a Unicode Character Database (UCD )character property of a Unicode codepoint.

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

A Unicode codepoint, or an expression which evaulates to a Unicode codepoint.

propertyName

The name of a supported UCD codepoint property. Examples of supported properties, for a full list see http://www.unicode.org/versions/Unicode6.2.0/ch04.pdf

"Name": Unique name for the codepoint
"Numeric_Value": Numerical value, e.g. 4 for 4
"Quotation_Mark": True if the codepoint is a quotation mark
"Uppercase_Mapping": Uppercase equivalent of the codepoint
"Lowercase": True if the codepoint is lower-case
Example
get codepointProperty("A","Script") -- returns "Latin"
put codePointProperty(codepoint 1 of tString, "Name")
Values
NameTypeDescription
return

The codepointProperty returns the value of the UCD property for the specified Unicode codepoint.

RelatedKeyword: codepoint, codepoints
Function: nativeCharToNum, numToNativeChar, toUpper, numToCodepoint
Operator: equals
Description

Use the codepointProperty function to retrieve a UCD property of a Unicode codepoint.

The Unicode standard and the associated Unicode Character Database (UCD) define a series of properties for each codepoint in the Unicode standard. A number of these properties are used internally by the engine during text processing but it is also possible to query these properties directly using this function.

There are many properties available; please see the version 6.3.0 of the Unicode standard, Chapter 4 and Section 5 of Unicode Technical Report (TR)#44 for details on the names and values of properties. Property names may be specified with either spaces or underscores and are not case-sensitive.

Note: This function is not intended for general-purpose use; please use functions such as toUpper or the is|equals operators instead.