在vb.net中计算字符串中的特定字符 [英] count particular character in string in vb.net

查看:255
本文介绍了在vb.net中计算字符串中的特定字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,
谁能为我提供以下帮助
考虑以下字符串

Hello friends,
Can anyone help me for the following
Consider following string

AA,BB,CC,DD


我正在尝试在字符串数组中获取这些值,如下所示


I''m trying to get those values in string array as below

AA
BB
CC
DD



任何想法如何去做.

在此先感谢



Any idea how to go about it.

Thanks in Advance

推荐答案

现在,问题的标题与问题的正文到底有什么关系?鉴于您的问题的正文包含最相关的信息,我敢说您想使用逗号作为分隔符将字符串拆分为单独的标记.请查看 String.Split [ ^ ]方法产生一个String数组,并具有一些方便的重载.

最好的问候,
Now what exactly does the title of your question have to do with the body of your question? Given that the body of your question holds the most relevant information I dare say you want to split a string in to separate tokens using the comma as a separator. Please have a look into the String.Split[^] method which yields a String array and has several convenient overloads.

Best Regards,


这篇关于在vb.net中计算字符串中的特定字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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