Releases: CTMacUser/ClassicFourCharCode
Releases · CTMacUser/ClassicFourCharCode
0.3.0
0.2.0
- Second Release
- As codes are typically used as values frequently defined or read atomically but almost never read or changed at the coded-character level:
- Mutability at the coded-character level has been removed.
Sequence,Collection, andDataProtocolsupport have been removed.- Since inline arrays have been added to the language, all the old additional initializers have been replaced. There is now an initializer that takes an inline array of four bytes.
- To complement that inline-array initializer, the
octetsproperty returns the coded characters as separate elements of an inline array of four bytes.
0.1.0
0.1.0
- First Release
- Introduces the
ClassicFourCharCodetype, which is a wrapper for theFoundationtypeFourCharCode. Older compilers supported the type natively, able to set the numeric value based on the four-character string given. - The adaptor type is represented as conforming
ClassicFourCharCodetoRawRepresentable. The basic behaviors ofBitwiseCopyable,Equatable, andHashableare automatically supported. The type is declared to be safe forSendable. - Codes can be printed in its classic text (
CustomStringConvertible) or a debug-friendly numeric (CustomDebugStringConvertible) representation. Since the classic representation can contain embeddedNULor other control characters, the computed read-onlyisPrintableproperty warns when that occurs. The type is also supportsEncodablefor export. - Codes can be imported from reversing the above serializations with
DecodableandLosslessStringConvertiblesupport. (The latter supports both the classic text or debugging numeric formats.) There are additional initializers for: four copies of the same octet value, four individual octet values, extraction from an iterator, and reading from a sequence. The latter two are failable if the input is too short (and possibly too long). - The individual octets of a code can be read/written with
Collectionsupport. They can be read through memory buffer(s) withContiguousBytesandDataProtocolsupport.