Lasso Soft Inc. > Home

[ string->getpropertyvalue ]

Method

This method returns the Unicode property value for the indicated character. Unicode properties are defined in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). For details about the properties see http://www.unicode.org/.

Lasso defines many values for these Unicode property names. All of these values have the UCHAR_ prefix.

  • Syntax
THE_STRING->getPropertyValue(CHAR_POSITION, PROPERTY_NAME)
Examples
  • Beginner

This example uses [string->getPropertyValue] for each character of the sample string to determine the character category ID.

Code

local(str = 'As someone once said, "星星之火可以燎原"')

with i in 1 to #str->size
select #str->getPropertyValue(#i, UCHAR_GENERAL_CATEGORY)

Result

1, 2, 12, 2, 2, 2, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 23, 12, 23, 5, 5, 5, 5, 5, 5, 5, 5, 23

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft