Shweta's Notes
Search site
String Manipulation In Java
String Manipulation In Java
Remove all SPACES from a string and concentate
s
=
s.replaceAll("\\s","");
Remove all PUNCTUATIONS from a string
s
=
s.replaceAll("\\p{Punct}","");
Edit this page on GitHub
Links to this note
Useful Java Tricks for LeetCode