如 字符串 ccvvddeessss如何判断 c 是否在  ccvvddeessss 中?
v 是否在  ccvvddeessss 中?
a 是否在  ccvvddeessss 中?

解决方案 »

  1.   

    string str = "ccvvddeessss";
    if(str.IndexOf("v")>=0)
    {
    //存在
    }
      

  2.   

    if(str.Contains("c"))
    或者if(str.IndexOf("c") > -1)
      

  3.   

    方法太多了。正则
    indexof
    contains都可以
      

  4.   

    使用String里面的contains()方法就可以呀
      

  5.   

    string.contains("c")如果等于true表示包含有
      

  6.   

    if (str.IndexOf("v") >= 0)
            {
                //存在 
            }
      

  7.   

    string str="ccvvddeessss ";
    if (str.IndexOf("v") >-1)
            {
                //存在 
            }