On Mon, Mar 8, 2010 at 3:57 PM, Gregor Best <g...@ring0.de> wrote: > I never read the actual docs of that function (a few glances at the > manpage aside), and if it definitely says "count the number of bytes", > fine. But intuitively, I would've thought it gives the length of a > string, as in "how many letters appear on my screen if I printf() > this?".
Plan 9 has utflen() for that purpose. Also, how many characters appear depends on what encoding your terminal is using. strlen() is absolute, and is probably more useful in most contexts.