Browse Source

Adds String class >> esc

Nicolas Petton 10 years ago
parent
commit
02f323c008
3 changed files with 35 additions and 0 deletions
  1. 13 0
      js/Kernel-Collections.deploy.js
  2. 18 0
      js/Kernel-Collections.js
  3. 4 0
      st/Kernel-Collections.st

+ 13 - 0
js/Kernel-Collections.deploy.js

@@ -3297,6 +3297,19 @@ return self}, function($ctx1) {$ctx1.fill(self,"crlf",{},smalltalk.String.klass)
 messageSends: []}),
 smalltalk.String.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "esc",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self._fromCharCode_((27));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"esc",{},smalltalk.String.klass)})},
+messageSends: ["fromCharCode:"]}),
+smalltalk.String.klass);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "fromCharCode:",

+ 18 - 0
js/Kernel-Collections.js

@@ -4431,6 +4431,24 @@ referencedClasses: []
 }),
 smalltalk.String.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "esc",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self._fromCharCode_((27));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"esc",{},smalltalk.String.klass)})},
+args: [],
+source: "esc\x0a\x09^ self fromCharCode: 27",
+messageSends: ["fromCharCode:"],
+referencedClasses: []
+}),
+smalltalk.String.klass);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "fromCharCode:",

+ 4 - 0
st/Kernel-Collections.st

@@ -1466,6 +1466,10 @@ crlf
 	<return '\r\n'>
 !
 
+esc
+	^ self fromCharCode: 27
+!
+
 lf
 	<return '\n'>
 !