Commit 5f27affb42337dc605a9a59f1c6a99516cd9747a

Paul Eggert 2023-08-26T23:19:12

trim: do not over-allocate result * lib/trim.c: Include mbuiterf.h, not mbiterf.h, since we no longer compute strlen at first. (trim2): Do not over-allocate result and then trim the parts we don’t want. Instead, skip unwanted input before allocating, so that the result is just the right size. Use mempcpy instead of memmove. Simplify. * modules/trim (Depends-on): Remove mbiterf, memmove, strdup, xalloc. Add mbuiterf, mempcpy, xalloc-die.