... a handy trick. Thanks for speaking up. I wasn't aware there was
such a straight-forward way of doing it before JDK 1.4!
Jarnot Voytek Contr AU HQ/SC wrote:
firstly, this is OT, secondly if you're using JDK 1.4, here's your one-liner
(String in question is str):
str = str.replaceAll(\\n,
firstly, this is OT, secondly if you're using JDK 1.4, here's your one-liner
(String in question is str):
str = str.replaceAll(\\n, br);
which is a short way of writing:
Pattern.compile(\\n).matcher(str).replaceAll(br);
also a one-liner...
--
Voytek Jarnot
Quidquid latine dictum sit, altum
2 matches
Mail list logo