<div>I also wonder what folks are actually doing that require indexing into strings. I would love to see some real world examples of what and why indexing into a string is needed. Who is the end consumer of that string, etc.</div><div><br></div><div>Do folks have so examples?<br><br>-Shawn</div><div><br><div class="gmail_quote"><div>On Thu, Feb 9, 2017 at 6:56 AM Ted F.A. van Gaalen via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg">Hello Hooman<div class="gmail_msg">That invalidates my assumptions, thanks for evaluating</div><div class="gmail_msg">it&#39;s more complex than I thought.</div><div class="gmail_msg">Kind Regards</div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg">Ted</div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On 8 Feb 2017, at 00:07, Hooman Mehr &lt;<a href="mailto:hooman@mac.com" class="gmail_msg" target="_blank">hooman@mac.com</a>&gt; wrote:</div><br class="m_-3350453363809899528Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div style="word-wrap:break-word" class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Feb 7, 2017, at 12:19 PM, Ted F.A. van Gaalen via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_-3350453363809899528Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="gmail_msg"><font color="#252525" face="sans-serif" class="gmail_msg">I now assume that:</font></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="gmail_msg"><font color="#252525" face="sans-serif" class="gmail_msg">      1. -= a “plain” Unicode character (codepoint?)  can result in one glyph.=-</font></div></div></blockquote><br class="gmail_msg">What do you mean by “plain”? Characters in some Unicode scripts are by no means “plain”. They can affect (and be affected by) the characters around them, they can cause glyphs around them to rearrange or combine (like ligatures) or their visual representation (glyph) may float in the same space as an adjacent glyph (and seem to be part of the “host” glyph), etc. So, the general relationship of a character and its corresponding glyph (if there is one) is complex and depends on context and surroundings characters.</div><div class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="gmail_msg"><font color="#252525" face="sans-serif" class="gmail_msg">      2. -= a  grapheme cluster always results in just a single glyph, true? =- </font></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">False</div><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="gmail_msg"><font color="#252525" face="sans-serif" class="gmail_msg">      3. The only thing that I can see on screen or print are glyphs (“carvings”,visual elements that stand on their own )</font></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">The visible effect might not be a visual shape. It may be for example, the way the surrounding shapes change or re-arrange.</div><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="gmail_msg"><font color="#252525" face="sans-serif" class="gmail_msg">     4.  In this context, a glyph is a humanly recognisable visual form of a character,</font></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Not in a straightforward one to one fashion, not even in Latin / Roman script.</div><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="gmail_msg"><span style="color:rgb(37,37,37);font-family:sans-serif" class="gmail_msg">     5. On this level (the glyph, what I can see as a user) it is not relevant and also not detectable</span></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="gmail_msg"><span style="color:rgb(37,37,37);font-family:sans-serif" class="gmail_msg">         with how many Unicode scalars (codepoints ?), grapheme, or even on what kind</span></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="gmail_msg"><span style="color:rgb(37,37,37);font-family:sans-serif" class="gmail_msg">         of encoding the glyph was based upon.</span></div></div></blockquote><br class="gmail_msg"></div>False<div class="gmail_msg"><br class="gmail_msg"></div></div></div></blockquote></div><br class="gmail_msg"></div></div>_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div></div>