🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
1 messages
1 total messages Started by Junio C Hamano Mon, 23 Nov 2026 17:04
Re: [PATCH v5 2/4] utf8: fix comment for utf8_strnwidth()
#3644
Author: Junio C Hamano
Date: Mon, 23 Nov 2026 17:04
18 lines
13240 bytes
Dirk Gouders <dirk@gouders.net> writes:

> The comment for utf8_strnwidth() states it works on a NUL-terminated
> string whereas the string is bounded by len.
> It also states it returns strlen() for cases when the given string
> doesn't look like valid utf8, but it returns its argument len in such
> cases.
> ...
> - * Returns the total number of columns required by a null-terminated
> - * string, assuming that the string is utf8.  Returns strlen() instead
> + * Returns the total number of columns required by a string terminated by len,
> + * assuming that the string is utf8.  Returns len instead

"terminated" -> "bounded" (the proposed log message above uses the
verb, and it sounds much less awkward), perhaps?

Other than that, looking good.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads