class: CharacterArray
authorClaus Gittinger <cg@exept.de>
Sun, 26 Aug 2018 21:44:28 +0200
changeset 1071 aa0ecb4c9138
parent 1070 7b9c9cafec32
child 1072 c939641a3946
class: CharacterArray added: #urlDecoded #urlEncoded comment/format in: #unescapePercents #unescapePercentsWithTextEncoding: #withNoLineLongerThan: #withSqueakLineEndings
extensions.st
--- a/extensions.st	Sun Aug 26 19:20:17 2018 +0200
+++ b/extensions.st	Sun Aug 26 21:44:28 2018 +0200
@@ -332,14 +332,25 @@
 !String methodsFor:'*monticello-squeakCompatibility'!
 
 withSqueakLineEndings
-        "Answer a copy of myself in which all sequences of <CR><LF> or <LF> have been changed to <CR>"
+        "Answer a copy of myself in which all sequences of 
+         <CR><LF> or <LF> have been changed to <CR>.
+         Notice; that ST/X uses LF as line end internally"
+         
         | newText |
         (self includes: Character lf) ifFalse: [ ^self copy ].
         newText := self copyReplaceAll: String crlf with: String cr.
         (newText asString includes: Character lf) ifFalse: [ ^newText ].
         ^newText copyReplaceAll: String lf with: String cr asTokens: false.
 
+        "
+         ('a' , String lf , 'b' ,
+               String return , 'c' ,
+               String crlf , 'd' ,
+               String crlf) withSqueakLineEndings
+        "
+
     "Created: / 26-08-2009 / 11:35:56 / Jaroslav Havlin <havlij6@fel.cvut.cz>"
+    "Modified (comment): / 26-08-2018 / 13:34:17 / Claus Gittinger"
 ! !
 
 !StringCollection methodsFor:'converting'!