<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement UCharIterator StringView::createIterator()"
   href="https://bugs.webkit.org/show_bug.cgi?id=151917#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement UCharIterator StringView::createIterator()"
   href="https://bugs.webkit.org/show_bug.cgi?id=151917">bug 151917</a>
              from <span class="vcard"><a class="email" href="mailto:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=151917#c3">comment #3</a>)
<span class="quote">&gt; Could you please advise me on how to go about this? Should I just change it
&gt; to a function that takes a StringView while keeping it in StringView.h, or
&gt; should I not do this in general? If the latter, is there a way to avoid
&gt; duplicate code?</span >

As a first step, I’d suggest changing it to a function that takes a StringView and putting the function in Collator.h. Later we can move it somewhere else if we want to use UCharIterator for things other than collation.

The Collator abstraction is not super-important since we are OK with WebKit using ICU directly. It was created by someone who was trying to change WebKit to work with multiple international libraries, but that’s not really a goal for the project now.

Anyway, I think having UCharIterator createUCharIterator(StringView) in Collator.h would be a fine way to share it with other code.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>