That sounds reasonable, but I wonder if it would be better to have something like:
extension Character {
/// If this Character is ASCII, return the ASCII values that comprise it,
/// otherwise returns nil.
///
/// For most ASCII Characters, there is only one value that comprises the
/// grapheme, returned in the first value of the result. The second value is 0.
///
/// For "\r\n" (CR-LF), which is a single Character, this returns (0x0d, 0x0a)
///
var asciiValue: (UInt8, UInt8)? {
...
}
}
Or perhaps we have asciiValue return a single value, and also have some query for the CR-LF corner case. WDYT?