I have used C# for this code snippet.
public class checkString { public static void Main() { string strSource = "ABCacd12"; if(CheckString1(strSource)) { Console.WriteLine("Unique!!!"); } else { Console.WriteLine("Not Unique!!!"); } } public static bool CheckString1(string str) { int strLength = str.Length; for(int i=0;i<strLength;i++) { for(int j=i+1;j<strLength;j++) { if(str.ElementAt(i)==str.ElementAt(j)) return false; } } return true; } }