我正在尝试更改字符串中特定索引处的单个字符,但我不知道如何更改。例如,我如何将“hello world”中的第四个字符更改为“x”,以便它成为“helxo world”?
string char rust
char ×1
rust ×1
string ×1