ff674f818f
my own for now that just does what I need it to. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4103 542714f4-19e9-0310-aa3c-eee0fc999fb1
34 lines
661 B
ActionScript
34 lines
661 B
ActionScript
package com.threerings.util {
|
|
|
|
public class StringBuilder
|
|
{
|
|
public function StringBuilder (... args)
|
|
{
|
|
_array = args;
|
|
}
|
|
|
|
/**
|
|
* Append all arguments to the end of the string being built
|
|
* and return this StringBuilder.
|
|
*/
|
|
public function append (... args) :StringBuilder
|
|
{
|
|
while (args.length > 0) {
|
|
_array.push(args.shift());
|
|
}
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Return the String built so far.
|
|
*/
|
|
public function toString () :String
|
|
{
|
|
return _array.join("");
|
|
}
|
|
|
|
/** Our array in which we place all arguments. */
|
|
protected var _array :Array;
|
|
}
|
|
}
|