try to fix some minor dropdown bugs
[potlatch2.git] / org / rxr / actionscript / io / StringWriter.as
1 package org.rxr.actionscript.io\r
2 {\r
3 \r
4         /**\r
5          * \r
6          * Simple class for manipulating a string.\r
7          * \r
8          * @author wischusen\r
9          * \r
10          */     \r
11         public class StringWriter\r
12         {\r
13         \r
14                 private var value : String = "";\r
15                 private var buffer : String = "";\r
16                         \r
17                 public function write (str : String) : void\r
18                 {\r
19                         buffer += str;\r
20                 }\r
21                 \r
22                 public function flush () : void\r
23                 {\r
24                         value += buffer;\r
25                         buffer = "";\r
26                 }\r
27                 \r
28                 \r
29                 public function clear () : void\r
30                 {\r
31                         value = buffer = "";\r
32                 }\r
33                 \r
34                 public function toString() : String\r
35                 {\r
36                         return value;\r
37                 }\r
38         \r
39         }\r
40         \r
41 }