Compare length of two strings: Difference between revisions
Content added Content deleted
Line 1,227: | Line 1,227: | ||
=={{header|EMal}}== |
=={{header|EMal}}== |
||
<syntaxhighlight lang="emal"> |
<syntaxhighlight lang="emal"> |
||
List list = text["abcd","123456789","abcdef","1234567 |
List list = text["abcd","123456789","abcdef","1234567", "Привет, мир"] |
||
^|this solves the task doing the comparison by using the diamond operator|^ |
^|this solves the task doing the comparison by using the diamond operator|^ |
||
fun comparator = int by text a, text b do return b.length <> a.length end |
fun comparator = int by text a, text b do return b.length <> a.length end |
||
Line 1,242: | Line 1,242: | ||
<pre> |
<pre> |
||
text chars bytes |
text chars bytes |
||
مرحبا بالعالم 13 25 |
|||
Привет, мир 11 20 |
Привет, мир 11 20 |
||
123456789 9 9 |
123456789 9 9 |