我如何用特定字符填充字符串,例如 make string 和 length like (y,4) 结果是 yyyy 我知道 c++ 中有类似的东西,fillstring C# 中是否也存在
最佳答案
只需使用合适的 constructor :
string text = new string('y', 4);
关于c# - 复制特定长度的字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18426495/