Re:Six times faster than C
by utopcell on Thursday July 06, 2023 @11:36PM
(#36626780)
Bummer! Edited the answer. Not sure about the off-by-one though.
Say the string is str[] = "spp\0". n = strlen(str) is 3.
In the end, res would be 1 and 2 * res - n == -1.
[ Parent
| on HN ]