Slightly faster and idiomatic put-string