+ 5
How can we replace a character with space ?
For example we have this line : 133-124 And we want it to be like : 133 124
5 Respuestas
+ 7
Iterate into elements of your string(char[]) using a for loop and whenever you found "-" replace it with " "
simple :)
+ 5
BEN_10 thank u
It's axactlly what i wanted
+ 5
You do this by some few lines of codes :
String sort= "133-124".replaceAll("[^a-zA-Z0-9 ]"," ");
System.out.println(sort);
+ 4
[DELETED]
EDIT:
Sorry, I didn't see you tageed C, my answer was valid for python only ^^"