Is there an easy way to remove substring from a given String in Java?
String
Example: "Hello World!", removing "o" → "Hell Wrld!"
"Hello World!"
"o"
"Hell Wrld!"
You could easily use String.replace():
String.replace()
String helloWorld = "Hello World!"; String hellWrld = helloWorld.replace("o","");
1.4m articles
1.4m replys
5 comments
56.9k users