Most of the code you needed is in the String API. Just check the documentation. You wont benefit anything from asking people to do the coding for you. The code u needed is just simple, with patient i...