Java method similar to nl2br in PHP

June 25th, 2009One Comment

Below Java method will work same as PHP function nl2br

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

Related Posts:

Tagged : , ,

One Responses

  1. I want to say – thank you for this!

Leave a Reply