Lasso Soft Inc. > Home

[ string->hasbinaryproperty ]

Method

This method returns true or false if the indicated character has the indicated Unicode property. 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->hasBinaryProperty(CHAR_POSITION, PROPERTY_NAME)
Examples
  • Beginner

This example uses [string->hasBinaryProperty], for each character of the sample string, to determine if the character is one that could be in a hex string. The method returns true or false, indicating the true or false property status of the character.

Code

local(str = 'the quick brown fox jumped over the lazy programmer')

with i in 1 to #str->size
select #str->hasBinaryProperty(#i, UCHAR_HEX_DIGIT)

Result

false, false, true, false, false, false, false, true, false, false, true, false, false, false, false, false, true, false, false, false, false, false, false, false, true, true, false, false, false, true, false, false, false, false, true, false, false, true, false, false, false, false, false, false, false, false, true, false, false, true, false

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