eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FourByteString':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: FourByteString


Inheritance:

   Object
   |
   +--Collection
      |
      +--SequenceableCollection
         |
         +--ArrayedCollection
            |
            +--UninterpretedBytes
               |
               +--CharacterArray
                  |
                  +--FourByteString
                     |
                     +--Unicode32String

Package:
stx:libbasic2
Category:
Collections-Text
Version:
rev: 1.12 date: 2017/08/31 12:51:34
user: stefan
file: FourByteString.st directory: libbasic2
module: stx stc-classLibrary: libbasic2
Author:
Claus Gittinger

Description:


FourByteStrings are like strings, but storing 32bits per character.
The integration of them into the system is not completed ....


Related information:

    Text
    TwoByteString
    UnicodeEncodedString
    StringCollection

Class protocol:

initialization
o  initialize
initialize the class - private
usage example(s):
     FourByteString initialize

instance creation
o  basicNew: anInteger
return a new empty string with anInteger characters

o  uninitializedNew: anInteger
return a new empty string with anInteger characters
usage example(s):
        self uninitializedNew:10


Instance protocol:

accessing
o  basicAt: index
return the character at position index, an Integer
- reimplemented here since we return 32-bit characters

o  basicAt: index put: aCharacter
store the argument, aCharacter at position index, an Integer.
Returns aCharacter (sigh).
- reimplemented here since we store 32-bit characters

queries
o  bitsPerCharacter
return the number of bits each character has.
Here, 32 is returned (storing quad byte characters).

o  bytesPerCharacter
return the number of bytes each character has.
Here, 4 is returned (storing quad byte characters).

o  isWideString
true if I require more than one byte per character

testing
o  isSingleByteCollection
return true, if the receiver has access methods for bytes;
i.e. #at: and #at:put: accesses a byte and are equivalent to #byteAt: and byteAt:put:
and #replaceFrom:to: is equivalent to #replaceBytesFrom:to:.
false is returned here since at: returns 4-byte characters and not bytes
- the method is redefined from UninterpretedBytes.



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 04 Aug 2025 16:39:06 GMT