;Task:

Given a character string &nbsp; (which may be empty, or have a length of zero characters):
::* &nbsp; create a function/procedure/routine to:
::::* &nbsp;  determine if all the characters in the string are unique
::::* &nbsp;  indicate if or which character is duplicated and where
::* &nbsp; display each string and its length &nbsp; (as the strings are being examined)
::* &nbsp; a zero─length (empty) string shall be considered as unique
::* &nbsp; process the strings from left─to─right
::* &nbsp; if &nbsp; &nbsp; &nbsp; unique, &nbsp; display a message saying such
::* &nbsp; if                  not unique, &nbsp; then:
::::* &nbsp;  display a message saying such
::::* &nbsp;  display what character is duplicated
::::* &nbsp;  only the 1<sup>st</sup> non─unique character need be displayed
::::* &nbsp;  display where "both" duplicated characters are in the string
::::* &nbsp;  the above messages can be part of a single message
::::* &nbsp;  display the hexadecimal value of the duplicated character



Use (at least) these five test values &nbsp; (strings):
:::* &nbsp; a string of length &nbsp; &nbsp; 0 &nbsp; (an empty string)
:::* &nbsp; a string of length &nbsp; &nbsp; 1 &nbsp; which is a single period &nbsp; (<big>'''.'''</big>)
:::* &nbsp; a string of length &nbsp; &nbsp; 6 &nbsp; which contains: &nbsp; '''abcABC'''
:::* &nbsp; a string of length &nbsp; &nbsp; 7 &nbsp; which contains a blank in the middle: &nbsp; '''XYZ&nbsp; ZYX'''
:::* &nbsp; a string of length &nbsp;       36 &nbsp; which &nbsp; ''doesn't'' &nbsp; contain the letter "oh":
::::::::  '''1234567890ABCDEFGHIJKLMN0PQRSTUVWXYZ'''



Show all output here on this page.

{{Template:Strings}}
<br><br>

