I have a string "refer reference-book" and I want to find the first character which occurs only once, in this string I have 2 characters which occurs only once which is a space " " and a hyphen "-" but the first character is space " " so I want to return that from a method.
How to do this?