Export the ability to paragraphify text.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1003 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2002-12-30 04:55:01 +00:00
parent 574c1ac8bc
commit f006eaf5a7
@@ -1,5 +1,5 @@
//
// $Id: StringTool.java,v 1.5 2002/12/17 23:53:24 mdb Exp $
// $Id: StringTool.java,v 1.6 2002/12/30 04:55:01 mdb Exp $
//
// samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne
@@ -21,6 +21,8 @@
package com.samskivert.velocity;
import java.net.URLEncoder;
import com.samskivert.servlet.util.HTMLUtil;
import com.samskivert.util.StringUtil;
/**
@@ -51,4 +53,12 @@ public class StringTool
{
return String.valueOf(value);
}
/**
* Adds <p> tags between each pair of consecutive newlines.
*/
public String parafy (String text)
{
return HTMLUtil.makeParagraphs(text);
}
}