String.st
changeset 18587 df2481e32531
parent 18581 8c350282248e
child 18594 f69cc45e932a
--- a/String.st	Thu Jul 16 18:29:50 2015 +0200
+++ b/String.st	Thu Jul 16 18:30:04 2015 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -510,7 +508,6 @@
 ! !
 
 
-
 !String class methodsFor:'queries'!
 
 defaultPlatformClass
@@ -531,10 +528,6 @@
 ! !
 
 
-
-
-
-
 !String methodsFor:'Compatibility-VW5.4'!
 
 asByteString
@@ -1236,7 +1229,7 @@
      'hello world' indexOfAny:'AOE' startingAt:1
      'hello world' indexOfAny:'o' startingAt:6
      'hello world' indexOfAny:'o' startingAt:6
-     'hello world§' indexOfAny:'#§$' startingAt:6
+     'hello world§' indexOfAny:'#§$' startingAt:6
     "
 !
 
@@ -2996,7 +2989,7 @@
 
     "
      'abcde1234' utf8EncodedOn:('' writeStream)
-     'abcdeäöüß' utf8EncodedOn:('' writeStream)
+     'abcdeäöüß' utf8EncodedOn:('' writeStream)
     "
 ! !
 
@@ -3458,8 +3451,8 @@
     "
       'hello world' asUnicode16String errorPrint
       (Character value:356) asString errorPrint
-      'Bönnigheim' errorPrint
-      'Bönnigheim' asUnicodeString errorPrint
+      'Bönnigheim' errorPrint
+      'Bönnigheim' asUnicodeString errorPrint
     "
 !
 
@@ -3675,6 +3668,13 @@
     "Modified: 20.4.1996 / 23:08:42 / cg"
 !
 
+bitsPerCharacterInString
+    "return the number of bits each character has.
+     Here, 8 is returned (storing single byte characters)."
+    
+    ^ 8
+!
+
 contains8BitCharacters
     "return true, if the underlying string contains 8BitCharacters (or widers)
      (i.e. if it is non-ascii)"
@@ -3834,7 +3834,6 @@
     ^ super reverse
 ! !
 
-
 !String methodsFor:'substring searching'!
 
 indexOfSubCollection:aSubString startingAt:startIndex ifAbsent:exceptionValue caseSensitive:caseSensitive
@@ -4346,7 +4345,6 @@
 
 ! !
 
-
 !String class methodsFor:'documentation'!
 
 version