@@ -1948,6 +1948,17 @@ return self;}
}),
smalltalk.String);
+smalltalk.addMethod(
+"_do_",
+smalltalk.method({
+selector: "do:",
+fn: function (aBlock) {
+var self=this;
+for(var i=0;i<self.length;i++){aBlock(self.charAt(i));};
+return self;}
+}),
+smalltalk.String);
+
smalltalk.addMethod(
"_escaped",
smalltalk.method({
@@ -2754,6 +2754,22 @@ referencedClasses: []
+category: 'enumerating',
+return self;},
+args: ["aBlock"],
+source: "do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self.charAt(i));}>",
+messageSends: [],
+referencedClasses: []
@@ -1054,6 +1054,12 @@ shallowCopy
^self class fromString: self
! !
+!String methodsFor: 'enumerating'!
+do: aBlock
+ <for(var i=0;i<self.length;i++){aBlock(self.charAt(i));}>
+! !
!String methodsFor: 'printing'!
printNl