1 Clazz.declarePackage ("com.stevesoft.pat");
\r
2 Clazz.load (["com.stevesoft.pat.BasicStringBufferLike"], "com.stevesoft.pat.StringBufferLike", ["com.stevesoft.pat.CaseMgr"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
7 Clazz.instantialize (this, arguments);
\r
8 }, com.stevesoft.pat, "StringBufferLike", null, com.stevesoft.pat.BasicStringBufferLike);
\r
9 Clazz.makeConstructor (c$,
\r
12 }, "com.stevesoft.pat.BasicStringBufferLike");
\r
13 Clazz.defineMethod (c$, "toStringLike",
\r
15 return this.sbl.toStringLike ();
\r
17 Clazz.defineMethod (c$, "toString",
\r
19 return this.sbl.toString ();
\r
21 Clazz.defineMethod (c$, "appendC",
\r
23 switch (this.mode) {
\r
25 this.mode = this.altMode;
\r
28 this.sbl.appendC (com.stevesoft.pat.CaseMgr.toUpperCaseC (c));
\r
31 this.mode = this.altMode;
\r
34 this.sbl.appendC (com.stevesoft.pat.CaseMgr.toLowerCaseC (c));
\r
37 if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) {
\r
39 this.sbl.appendC ('\\');
\r
41 this.sbl.appendC (c);
\r
45 Clazz.overrideMethod (c$, "append",
\r
47 for (var i = 0; i < s.length; i++) {
\r
48 this.appendC (s.charAt (i));
\r
51 Clazz.defineMethod (c$, "setMode",
\r
53 if (c == 'u' || c == 'l') {
\r
54 if (this.altMode == ' ') {
\r
55 this.altMode = this.mode;
\r
58 Clazz.defineMethod (c$, "unwrap",
\r
60 return this.sbl.unwrap ();
\r