Unicode16String.st
changeset 7946 469d2d1c61f1
child 7949 421a3e216337
equal deleted inserted replaced
7945:d5df0089605f 7946:469d2d1c61f1
       
     1 "
       
     2  COPYRIGHT (c) 1997 by eXept Software AG 
       
     3 	      All Rights Reserved
       
     4 
       
     5  This software is furnished under a license and may be used
       
     6  only in accordance with the terms of that license and with the
       
     7  inclusion of the above copyright notice.   This software may not
       
     8  be provided or otherwise made available to, or used by, any
       
     9  other person.  No title to or ownership of the software is
       
    10  hereby transferred.
       
    11 
       
    12 
       
    13 "
       
    14 
       
    15 "{ Package: 'stx:libbasic' }"
       
    16 
       
    17 TwoByteString variableWordSubclass:#Unicode16String
       
    18 	instanceVariableNames:''
       
    19 	classVariableNames:''
       
    20 	poolDictionaries:''
       
    21 	category:'Collections-Text'
       
    22 !
       
    23 
       
    24 !Unicode16String class methodsFor:'documentation'!
       
    25 
       
    26 copyright
       
    27 "
       
    28  COPYRIGHT (c) 1997 by eXept Software AG 
       
    29 	      All Rights Reserved
       
    30 
       
    31  This software is furnished under a license and may be used
       
    32  only in accordance with the terms of that license and with the
       
    33  inclusion of the above copyright notice.   This software may not
       
    34  be provided or otherwise made available to, or used by, any
       
    35  other person.  No title to or ownership of the software is
       
    36  hereby transferred.
       
    37 
       
    38 
       
    39 "
       
    40 !
       
    41 
       
    42 documentation
       
    43 "
       
    44     Not yet finished - unicode support is currently being implemented.
       
    45 "
       
    46 ! !
       
    47 
       
    48 !Unicode16String class methodsFor:'initialization'!
       
    49 
       
    50 initialize
       
    51     "initialize the class - private"
       
    52 
       
    53     self flags:(Behavior flagWords)
       
    54 
       
    55     "
       
    56      Unicode16String initialize
       
    57     "
       
    58 
       
    59     "Created: 30.6.1997 / 15:35:52 / cg"
       
    60     "Modified: 30.6.1997 / 15:39:21 / cg"
       
    61 ! !
       
    62 
       
    63 !Unicode16String methodsFor:'conversion'!
       
    64 
       
    65 asSymbolIfInterned
       
    66     |s|
       
    67 
       
    68     Error catch:[
       
    69         s := self asSingleByteString.
       
    70     ].
       
    71     s isNil ifTrue:[^ s].
       
    72     ^ s asSymbolIfInterned
       
    73 !
       
    74 
       
    75 asUnicodeString
       
    76     ^ self
       
    77 !
       
    78 
       
    79 printOn:aStream
       
    80     self utf8EncodedOn:aStream
       
    81 ! !
       
    82 
       
    83 !Unicode16String methodsFor:'queries'!
       
    84 
       
    85 encoding
       
    86     "return the strings encoding as a symbol. 
       
    87      Here, the constant symbol #unicode is returned."
       
    88 
       
    89     ^ #unicode
       
    90 
       
    91     "Created: 30.6.1997 / 15:39:41 / cg"
       
    92 ! !
       
    93 
       
    94 !Unicode16String class methodsFor:'documentation'!
       
    95 
       
    96 version
       
    97     ^ '$Header: /cvs/stx/stx/libbasic/Unicode16String.st,v 1.1 2004-02-13 12:46:53 cg Exp $'
       
    98 ! !
       
    99 
       
   100 Unicode16String initialize!