Skip to content

0.1.0

Choose a tag to compare

@CTMacUser CTMacUser released this 15 Apr 03:11
· 14 commits to main since this release
8cf77ce

0.1.0

  • First Release
  • Introduces the ClassicFourCharCode type, which is a wrapper for the Foundation type FourCharCode. 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 ClassicFourCharCode to RawRepresentable. The basic behaviors of BitwiseCopyable, Equatable, and Hashable are automatically supported. The type is declared to be safe for Sendable.
  • Codes can be printed in its classic text (CustomStringConvertible) or a debug-friendly numeric (CustomDebugStringConvertible) representation. Since the classic representation can contain embedded NUL or other control characters, the computed read-only isPrintable property warns when that occurs. The type is also supports Encodable for export.
  • Codes can be imported from reversing the above serializations with Decodable and LosslessStringConvertible support. (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 Collection support. They can be read through memory buffer(s) with ContiguousBytes and DataProtocol support.