Determine if a string has all the same characters: Difference between revisions

Content added Content deleted
(→‎{{header|zkl}}: added code)
(→‎{{header|zkl}}: flagged as needing improvement.)
Line 312: Line 312:


=={{header|zkl}}==
=={{header|zkl}}==

{{improve|zkl|<br><br> Output is incorrect about ''consists of a single charcter'' (sic)
<br><br> Output is lacking whether or not the characters are the same (or not)
<br><br> Output is missing what the different character is and where it is in the string
<br><br> Output of the word "unique" is misleading and/or incorrect. <br><br> }}

<lang zkl>fcn stringSameness(str){ // Does not handle Unicode
<lang zkl>fcn stringSameness(str){ // Does not handle Unicode
sz,unique,uz := str.len(), str.unique(), unique.len();
sz,unique,uz := str.len(), str.unique(), unique.len();