Files
narya/src/as/com/threerings/util/StringBuilder.as
T
Ray Greenwell ff674f818f Beta 3 is out! They removed the built-in StringBuilder class, so I made
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
2006-05-09 23:01:15 +00:00

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;
}
}