开发者

how to omit the - in the string?

开发者 https://www.devze.com 2022-12-29 19:14 出处:网络
I have a string like this: 开发者_如何学运维string Fname = name - shiva; While assigning to the other string I need remove the - in between.

I have a string like this:

开发者_如何学运维string Fname = name - shiva;

While assigning to the other string I need remove the - in between.

Can anybody help me out?


Did you mean that you have something like this:

string Fname = "name - shiva";

In any case, try:

myString.replace("-", "")

You can customize as needed to meet your needs...

0

精彩评论

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