Unique characters in each string: Difference between revisions
Content added Content deleted
Catskill549 (talk | contribs) (added AWK) |
Drkameleon (talk | contribs) (Added Arturo implementation) |
||
Line 93: | Line 93: | ||
uniqueCharactersInEachString({"1a3c52debeffd", "2b6178c97a938stf", "3ycxdb1fgxa2yz"}) |
uniqueCharactersInEachString({"1a3c52debeffd", "2b6178c97a938stf", "3ycxdb1fgxa2yz"}) |
||
end considering</lang> |
end considering</lang> |
||
=={{header|Arturo}}== |
|||
<lang rebol>arr: ["1a3c52debeffd" "2b6178c97a938stf" "3ycxdb1fgxa2yz"] |
|||
uniques: split first arr |
|||
loop arr 'str [ |
|||
uniques: intersection uniques |
|||
select split str 'x -> |
|||
1 = size match str x |
|||
] |
|||
print sort uniques</lang> |
|||
{{out}} |
|||
<pre>1 2 3 a b c</pre> |
|||
=={{header|AWK}}== |
=={{header|AWK}}== |
||
Line 135: | Line 152: | ||
3 strings, 43 characters, 20 different, 6 unique: 123abc |
3 strings, 43 characters, 20 different, 6 unique: 123abc |
||
</pre> |
</pre> |
||
=={{header|F_Sharp|F#}}== |
=={{header|F_Sharp|F#}}== |
||
<lang fsharp> |
<lang fsharp> |