optimized version of `kits.string/truncate`