复制特定长度的字符 [英] copy a character with specific length

查看:123
本文介绍了复制特定长度的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能填补像化妆字符串,长度就像一个特定字符的字符串(Y,4),结果为yyyy我知道有类似的东西在C ++中,fillstring是存在于C#太

How can I fill a string with a specific character like make string and length like (y,4) and the result is yyyy I know there is something like in c++, fillstring Is that exist in c# too

推荐答案

只要使用适当的构造

string text = new string('y', 4);

这篇关于复制特定长度的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆