CharacterEncoderImplementations__ISO10646_to_UTF16LE.st
changeset 9326 46b7df422c6c
parent 8903 4e15c297fadc
child 14171 d0b0a6918da7
child 17711 39faaaf888b4
equal deleted inserted replaced
9325:a4c635a6f8eb 9326:46b7df422c6c
    39 
    39 
    40 documentation
    40 documentation
    41 "
    41 "
    42     encodes/decodes UTF16 LittleEndian (little-end-first)
    42     encodes/decodes UTF16 LittleEndian (little-end-first)
    43 "
    43 "
       
    44 !
       
    45 
       
    46 examples
       
    47 "
       
    48   Encoding (unicode to utf16LE)
       
    49      ISO10646_to_UTF16LE encodeString:'hello'.
       
    50 
       
    51 
       
    52   Decoding (utf16LE to unicode):
       
    53      |t|
       
    54 
       
    55      t := ISO10646_to_UTF16LE encodeString:''.
       
    56      ISO10646_to_UTF16LE decodeString:t.
       
    57 
       
    58   Decoding (utf16LE-Bytes to unicode):
       
    59      |bytes|
       
    60 
       
    61      bytes := #[ 16r40 0 16r41 0 16r42 0 16r43 0 16r44 0 ].
       
    62      ISO10646_to_UTF16LE decodeString:bytes.
       
    63 "
    44 ! !
    64 ! !
    45 
    65 
    46 !ISO10646_to_UTF16LE methodsFor:'private'!
    66 !ISO10646_to_UTF16LE methodsFor:'private'!
    47 
    67 
    48 nextPutTwoByteValue:anInteger to:aStream
    68 nextPutTwoByteValue:anInteger to:aStream
    60 ! !
    80 ! !
    61 
    81 
    62 !ISO10646_to_UTF16LE class methodsFor:'documentation'!
    82 !ISO10646_to_UTF16LE class methodsFor:'documentation'!
    63 
    83 
    64 version
    84 version
    65     ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF16LE.st,v 1.1 2005-07-07 17:36:33 cg Exp $'
    85     ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF16LE.st,v 1.2 2006-04-25 14:16:44 cg Exp $'
    66 ! !
    86 ! !