Determine if a string has all unique characters: Difference between revisions
Determine if a string has all unique characters (view source)
Revision as of 07:16, 10 July 2020
, 3 years ago→{{header|Ring}}
No edit summary |
|||
Line 2,683:
=={{header|Ring}}==
<lang ring>
inputStr = ["",".","abcABC","XYZ ZYX","1234567890ABCDEFGHIJKLMN0PQRSTUVWXYZ"]
for
for
see "Input = " + "'" + inputStr[n] + "'" + ", length = " + len(inputStr[n]) + nl▼
▲ see " First duplicate at positions " + x + " and " + y + ", character = " + "'" + char + "'" + nl
ok
next
next
▲ see " All characters are unique." + nl
next
</lang>
|