Added a variant of tcompose() that takes an array of string arguments.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1156 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2002-03-27 07:09:04 +00:00
parent 1a53da6727
commit a76d37cc27
@@ -1,5 +1,5 @@
//
// $Id: MessageBundle.java,v 1.5 2002/03/01 17:10:30 shaper Exp $
// $Id: MessageBundle.java,v 1.6 2002/03/27 07:09:04 shaper Exp $
package com.threerings.util;
@@ -282,6 +282,20 @@ public class MessageBundle
return compose(key, new String[] {
taint(arg1), taint(arg2), taint(arg3) });
}
/**
* A convenience method for calling {@link #compose(String,String[])}
* with an array of arguments that will be automatically tainted (see
* {@link #taint}).
*/
public static String tcompose (String key, String[] args)
{
String[] targs = new String[args.length];
for (int ii = 0; ii < args.length; ii++) {
targs[ii] = taint(args[ii]);
}
return compose(key, targs);
}
/** The path that identifies the resource bundle we are using to
* obtain our messages. */