Compare length of two strings: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
imported>J7M
(add SmallBASIC example)
m (→‎{{header|Wren}}: Changed to Wren S/H)
Line 2,818:
 
Unicode grapheme clusters, where what appears to be a single 'character' may in fact be an amalgam of several codepoints, are not directly supported by Wren but it is possible to measure the length in grapheme clusters of a string (i.e. the number of ''user perceived characters'') using the ''Graphemes.clusterCount'' method of the Wren-upc module.
<syntaxhighlight lang="ecmascriptwren">import "./upc" for Graphemes
 
var printCounts = Fn.new { |s1, s2, c1, c2|
9,482

edits