JSDOC/TextStream.js
authorAlan Knowles <alan@akkbhome.com>
Tue, 6 Jul 2010 13:31:07 +0000 (21:31 +0800)
committerAlan Knowles <alan@akkbhome.com>
Tue, 6 Jul 2010 13:31:07 +0000 (21:31 +0800)
JSDOC/TextStream.js [deleted file]

diff --git a/JSDOC/TextStream.js b/JSDOC/TextStream.js
deleted file mode 100644 (file)
index a916386..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-//<script type="text/javscript">
-
-XObject = imports.XObject.XObject;
-
-
-/**
-       @constructor
-*/
-TextStream = XObject.define(
-    function(text) {
-        if (typeof(text) == "undefined") text = "";
-        text = ""+text;
-        this.text = text;
-        this.cursor = 0;
-    },
-    Object, 
-    { 
-        
-        look : function(n) {
-            if (typeof n == "undefined") n = 0;
-            
-            if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
-                var result = new String("");
-                result.eof = true;
-                return result;
-            }
-            return this.text.charAt(this.cursor+n);
-        },
-
-        next : function(n) {
-            if (typeof n == "undefined") n = 1;
-            if (n < 1) return null;
-            
-            var pulled = "";
-            for (var i = 0; i < n; i++) {
-                if (this.cursor+i < this.text.length) {
-                    pulled += this.text.charAt(this.cursor+i);
-                }
-                else {
-                    var result = new String("");
-                    result.eof = true;
-                    return result;
-                }
-            }
-
-            this.cursor += n;
-            return pulled;
-        }
-});
\ No newline at end of file