incrementing the login name by 1
I need to create unique users. My thought is to create a first user, say: test1 and veryfy with my application that it is a unique one. When creating the second user, I will use test1 again and I should get the message from my application, that the user alredy exists. At this point I would like to increment the last character of the user's name making it test2, etc. Can someone help me?