Added urlEncode() to the Velocity string tool.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@877 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2002-10-25 18:04:44 +00:00
parent fb3be71567
commit 840fcbdf14
@@ -1,5 +1,5 @@
//
// $Id: StringTool.java,v 1.1 2002/02/10 05:06:09 mdb Exp $
// $Id: StringTool.java,v 1.2 2002/10/25 18:04:44 mdb Exp $
//
// samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne
@@ -20,6 +20,7 @@
package com.samskivert.velocity;
import java.net.URLEncoder;
import com.samskivert.util.StringUtil;
/**
@@ -34,4 +35,12 @@ public class StringTool
{
return StringUtil.blank(text);
}
/**
* URL encodes the supplied text.
*/
public String urlEncode (String text)
{
return URLEncoder.encode(text);
}
}