找回密码
 注册
搜索
热搜: 回贴

C#中判断字符串A中是否包含字符串B

2009-12-13 12:47| 发布者: admin| 查看: 51| 评论: 0|原作者: 段誉

〖stringa="dahioh123ge......


string a = "dahioh123geug";
string b = "123";
if(a.IndexOf(b)>-1)
{
//字符串A中包含字符串B
}

最新评论

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 01:29 , Processed in 0.078474 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

返回顶部