Btw, I suppose you could use the compile-time
sizeof
(both part1
and part2
are true compile-time size arrays!) instead of the run-time strlen
and avoid a variable length array.