<div dir="ltr">StaticString provides an "isASCII" boolean property, but manipulating strings still requires the use of UnicodeScalarView / CharacterView, even if the strings are statically known to be ASCII-only.<div><br></div><div>I think it would be nice to have an ASCIIString in the standard library, similar to StaticString but with the following improvements:</div><div><br></div><div>- ASCIIString itself would be MutableCollectionType, with Index == Int for easy access.</div><div><br></div><div>- Its Generator.Element would be something which works with simple + and - operators (either UInt8, or perhaps a repurposed UnicodeScalar, or a new ASCIIScalar).</div><div><br></div><div>- The ability to create new ASCIIStrings at runtime, by appending/removing bytes, or by concatenating other ASCIIStrings.</div><div><br></div><div>Would anyone else find this useful?</div><div><div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Jacob Bandes-Storch<br></div></div></div></div>
</div></div></div>