I tried to replace "-" character in a Java String but is doesn't work :
str.replace("\u2014", "");
Could you help me ?
String is Immutable in Java. You have to reassign it to get the result back:
String str ="your string with dashesh";
str= str.replace("\u2014", "");
See the API for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With