<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 08/18/2011 02:21 AM, unDEFER wrote:
    <blockquote cite="mid:op.v0ej93dpty9wl4@undecomp" type="cite">Hello!
      <br>
      <br>
      D language specification says that it supports UTF-8 strings, but
      I can't
      <br>
      find how to slice UTF-8 string by character index, not by bytes
      numbers.
      <br>
      Why there is no simple slice function in std.utf like attached
      code?
      <br>
    </blockquote>
    <br>
    BTW: your code is flawed. Feed it some of the stuff near the end of
    this post and it will fail:<br>
    <br>
    <a
href="http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454">http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454</a><br>
    <br>
    tl;dr; your code doesn't slice on characters but something called
    (IIRC) code points. If you start worrying about diacritic (and many
    end user will want you to)<br>
    you need to do a bunch more processing.<br>
    <br>
    <a href="http://en.wikipedia.org/wiki/Diacritic">http://en.wikipedia.org/wiki/Diacritic</a><br>
    <br>
    <blockquote cite="mid:op.v0ej93dpty9wl4@undecomp" type="cite">Thank
      you in advance.
      <br>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
phobos mailing list
<a class="moz-txt-link-abbreviated" href="mailto:phobos@puremagic.com">phobos@puremagic.com</a>
<a class="moz-txt-link-freetext" href="http://lists.puremagic.com/mailman/listinfo/phobos">http://lists.puremagic.com/mailman/listinfo/phobos</a></pre>
    </blockquote>
    <br>
  </body>
</html>