I ended up wrapping the Foundation type FourCharCode
so I can manage its values better (in a Swift-y way). It's at:
https://github.com/CTMacUser/ClassicFourCharCode
and I made a "0.1.0" tag. I put in every applicable standard-library and Foundation protocol I thought of. I'm looking for mistakes or for missing functionality.
(I can't add MutableDataProtocol
support because it adds both MutableCollection
and RangeReplaceableCollection
requirements, and the latter is impossible for a type whose purpose involves having exactly four elements.)