开发者

Need help with manipulating some string

开发者 https://www.devze.com 2023-01-28 21:48 出处:网络
ok so I have a string, let\'s say.. string s=\"My Page\"; Now I want to manipulate this string s and make开发者_如何学运维 it \"mypage\" i.e. all small letters and no spaces in between and then sto

ok so I have a string, let's say..

string s="My Page";

Now I want to manipulate this string s and make开发者_如何学运维 it "mypage" i.e. all small letters and no spaces in between and then store this value in another string. How can I do this ?


Try something like this:

s = s.ToLower().Replace(" ", "");


s = s.ToLower().Replace(" ", "");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号