Livecode Wiki
Advertisement

Used with the number function (control structure)to designate parts of a string delimited by Unicode sentence breaks, as determined by the ICU Library.Syntax:

sentences

Examples:

put "This is the first sentence. This is the second sentence." into tText
put the number of sentences in tText -- returns 2
put "The green apple costs $0.50, the red apple costs $0.60. Which one should I buy?" into tText
put the number of sentences in tText -- returns 2

Use the sentences keyword to count the number of sentences in a container.

A sentence is a chunk delimited by Unicode sentence breaks, as determined by the ICU Library.

The sentence chunk includes the punctuation mark at the end of

the sentence, if there is one.

Advertisement