Is there a rationale for this return? It's not generic at all, and it also makes very little sense in the context of this function: Why return a pointer to the beginning to the *buffer*?

`toUTFWz` should have no knowledge of how the output range S is implemented (or if it even has `[]` at all).

Why not return just void?