|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
add alphabets to a string
i need to check if a name(string) is already in database and if it is in, i need to add alphabets from A to Z at the end of the name, how do i do so?
After i append the name, i need to check again to see if the added name already exist too. thanks... ![]() |
|
#2
|
|||
|
|||
|
Quote:
you may want to clarify a bit... you want to add all the characters from A to Z, a random set of say 4??? |
|
#3
|
|||
|
|||
|
i need to add only one alphabet at the back if it exist. for example, Micheal Brown already exist, then i add A to it and it becomes Micheal Brown A, then if Micheal Brown A exist then i add B and it becomes Micheal Brown B..
|
|
#4
|
|||
|
|||
|
does anyone knows??? pls help...
thanks... |
|
#5
|
|||
|
|||
|
I think this should be pretty simple with a loop or a couple of nested loops. You could make a String or char[] with the letters of the alphabet, and append "i" char to the end of your original string as you loop through. You can define a global boolean and use that in your outer while loop condition. Then, your inner loop can set a boolean variable appropriately for what it finds.
|
|
#6
|
|||
|
|||
|
can u show me the codes???
thank you so much.. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > add alphabets to a string |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|