String.st
branchjv
changeset 19527 169a7088b668
parent 19410 f9d7cb8bd74c
parent 19503 f923e67431d8
child 19610 a9a6940944a9
equal deleted inserted replaced
19500:49f06f2390fa 19527:169a7088b668
   447 !String class methodsFor:'Compatibility-Squeak'!
   447 !String class methodsFor:'Compatibility-Squeak'!
   448 
   448 
   449 cr
   449 cr
   450     "return a string consisting of the cr-Character"
   450     "return a string consisting of the cr-Character"
   451 
   451 
   452     CR isNil ifTrue:[
   452     "/ ATTENTION: you get a NL (for compatibility) here!!
   453 	CR := String with:Character return
   453     "/ please use String return  / String lf
   454     ].
   454     self halt:'please make it explicit, if a return or a linefeed is wanted.'.
   455     ^ CR
   455     "/ for now.
   456 
   456     "/ will be changed, when the historic UNIX baggage is removed
   457     "Modified: / 13.11.1999 / 13:53:36 / cg"
   457     "/ and all cr's are really returns (instead of nl's).
       
   458      
       
   459     ^ self lf
   458 !
   460 !
   459 
   461 
   460 crlf
   462 crlf
   461     "return a string consisting of the cr-lf Characters"
   463     "return a string consisting of the cr-lf Characters"
   462 
   464 
   473 
   475 
   474     LF isNil ifTrue:[
   476     LF isNil ifTrue:[
   475 	LF := String with:Character linefeed
   477 	LF := String with:Character linefeed
   476     ].
   478     ].
   477     ^ LF
   479     ^ LF
       
   480 !
       
   481 
       
   482 return
       
   483     "return a string consisting of the cr-Character"
       
   484 
       
   485     CR isNil ifTrue:[
       
   486         CR := String with:Character return
       
   487     ].
       
   488     ^ CR
   478 !
   489 !
   479 
   490 
   480 stringHash:aString initialHash:speciesHash
   491 stringHash:aString initialHash:speciesHash
   481     "for squeak compatibility only; this is NOT the same hash as my instances use"
   492     "for squeak compatibility only; this is NOT the same hash as my instances use"
   482 
   493 
   502     ^ TAB
   513     ^ TAB
   503 ! !
   514 ! !
   504 
   515 
   505 
   516 
   506 
   517 
       
   518 
   507 !String class methodsFor:'queries'!
   519 !String class methodsFor:'queries'!
   508 
   520 
   509 defaultPlatformClass
   521 defaultPlatformClass
   510     "dummy for ST-80 compatibility"
   522     "dummy for ST-80 compatibility"
   511 
   523 
   520 
   532 
   521     ^ self == String
   533     ^ self == String
   522 
   534 
   523     "Modified: 23.4.1996 / 16:00:38 / cg"
   535     "Modified: 23.4.1996 / 16:00:38 / cg"
   524 ! !
   536 ! !
       
   537 
       
   538 
   525 
   539 
   526 
   540 
   527 
   541 
   528 !String methodsFor:'Compatibility-VW5.4'!
   542 !String methodsFor:'Compatibility-VW5.4'!
   529 
   543 
  3975     #endif
  3989     #endif
  3976 %}.
  3990 %}.
  3977     ^ super reverse
  3991     ^ super reverse
  3978 ! !
  3992 ! !
  3979 
  3993 
       
  3994 
  3980 !String methodsFor:'substring searching'!
  3995 !String methodsFor:'substring searching'!
  3981 
  3996 
  3982 indexOfSubCollection:aSubString startingAt:startIndex ifAbsent:exceptionValue caseSensitive:caseSensitive
  3997 indexOfSubCollection:aSubString startingAt:startIndex ifAbsent:exceptionValue caseSensitive:caseSensitive
  3983     "redefined as primitive for maximum speed (BM)"
  3998     "redefined as primitive for maximum speed (BM)"
  3984 
  3999 
  4486     ^ aRequestor traceString:self level:level from:referrer
  4501     ^ aRequestor traceString:self level:level from:referrer
  4487 
  4502 
  4488 
  4503 
  4489 ! !
  4504 ! !
  4490 
  4505 
       
  4506 
  4491 !String class methodsFor:'documentation'!
  4507 !String class methodsFor:'documentation'!
  4492 
  4508 
  4493 version
  4509 version
  4494     ^ '$Header$'
  4510     ^ '$Header$'
  4495 !
  4511 !