I have a string. I want to replace a character in this string, with another string. How do I do that please ?
For example i have aaaaa i want to replace the first 'a' with "bbbb"
for(i=0; i<aString.length()-1; i++){
if(aString.charAt(i)...some condition)
charAt(i) replace with some other string
}
Thats what im trying to do
replaceFirstnot do what you want?charwithstring, better use concatenation.