Well you are right, but these functions are not terribly fun to use.  Consider a parsing function which extracts an identifier.  For ASCII it&#x27;s:<p><pre><code>    if (isalpha(*s)) {
        *d++ = *s++;
        while (isalnum(*s))
          *d++ = *s++;
    }
</code></pre>
To use UTF-8 &#x2F; Unicode should require only small changes:<p><pre><code>    if (iswalpha(decode(&amp;s)) {
        encode(&amp;d, advance(&amp;s));
        while (iswalnum(decode(&amp;s))
            encode(&amp;d, advance(&amp;s));
    }
</code></pre>
For efficiency, don&#x27;t decode twice- have the decoder return a pointer to the next sequence:<p><pre><code>    if (iswalpha(c = utf8(&amp;s, &amp;n))) {
        encode(&amp;d, c);
        s = n;
        while (iswalnum(c = utf8(&amp;s, &amp;n))) {
            encode(&amp;d, c);
            s = n;
        }
    }
</code></pre>
Also should be able to match a string in line:<p><pre><code>   if (&#x27;A&#x27; == utf8(&amp;s, &amp;t) &amp;&amp; &#x27;B&#x27; == utf8(&amp;t, &amp;s) &amp;&amp; &#x27;C&#x27; == utf8(&amp;s, &amp;t)) &#x2F;&#x2F; we have &#x27;ABC&#x27;.</code></pre>