LiveCode Use the styledText property code example

Example 1: LiveCode Use the styledText property

"A" is in item 1 of "A,B,C" -- evaluates to true
"123" is in segment 2 of "123 456 789" -- evaluates to false

Example 2: LiveCode Use the styledText property

"A" is in "ABC" -- evaluates to true
"123" is in "13" -- evaluates to false

Example 3: LiveCode Use the styledText property

the number of chars of item 10 of myVariable

Example 4: LiveCode Use the styledText property

the number of lines in myVariable

Example 5: LiveCode Use the styledText property

char 3 to 1 of myValue -- won't work 
-- end cannot be greater than start

char -1 to -4 of myValue -- won't work
-- 4th from last comes before last

Example 6: LiveCode Use the styledText property

get char 1 to 3 of "ABCD" -- yields "ABC"
get segment 2 to -1 of myValue -- second segment to last segment
put it into line 7 to 21 of myValue -- replaces

Tags:

Misc Example