I have a method that receives a String, but I want to replace each space in the input string with a string consisting of three spaces. How could that start? With a replace?
I have a method that receives a String, but I want to replace each space in the input string with a string consisting of three spaces. How could that start? With a replace?
Yes, it's with the replace function in java.
string funcionReemplazarEspacios(string cadena) {
return cadena.replace(" ", " ");
}