c
if (len > 0 && in_space && normalize) {
    while (buf[len - 1] == 0x20) len--;
}
