nit: this will be slightly faster if you don't unconditionally allocate `~"ar"`