I'm wondering if I can use string.replace()
to replace all alphabets in a string?
String sentence = "hello world! 722"
String str = sentence.replace("what to put here", "@");
//now str should be "@@@@@ @@@@@! 722"
In other words, how do I represent alphabetic characters?
Alternatives are welcomed too, unless too long.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…