Use `replace(prefixLength, builder.length(), name)` maybe? No need to clear or change capacity.