[Re-added bug-gnulib in CC.] Hello Davide,
Thanks for the new code. Looks quite good now. The second loop, however, will crash when passed a string consisting entirely of whitespace. I see also you've partially adopted the GNU style for this code. Fine! Indeed, before we put code into gnulib, we reindent it to GNU style. Another element of this style is to put a space before the opening parenthesis of function definitions, function calls and macro calls: for (; mbi_avail (i) && mb_isspace (mbi_cur (i)); mbi_advance (i)) etc. This and the handling of platforms without multibyte functions (see my last mail), and the code is ready for committing. Bruno