<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Fri, Jan 8, 2016, at 09:56 PM, Jacob Bandes-Storch wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div><div><div>Question: Why doesn't this proposal also include UTF8View and UTF16View?<br></div>
</div>
</div>
</div>
</blockquote><div> </div>
<div>Mostly because those are extra work and I didn't see much benefit to them. The point of this addition is simply to make it possible to slice StaticStrings and get something useful. If you want to work with UTF-8 you can already use the utf8Start + byteSize properties (assuming the StaticString isn't storing a single unicode scalar), and if you want to work with UTF-16, you probably already want to be using String. Also, even if we had a UTF8View and a UTF16View, you couldn't actually use them to slice the StaticString since a StaticString must contain a valid unicode sequence. They could have methods to translate from UTF8/UTF16 indices into UnicodeScalarView indices like String does, but ultimately, it seems like a lot of work for something that nobody's actually going to get around to using.<br></div>
<div> </div>
<div>-Kevin Ballard</div>
</body>
</html>