Java method similar to nl2br in PHP


Below Java method will work same as PHP function nl2br

public static String nl2br( String text){
return text.replaceAll("\n","<br />");
}

Related Posts:

One Responses


lilikindsli June 25, 2009 at 5:26 am

I want to say – thank you for this!


Comments are closed.