int index=str1.IndexOf('(');
if (index==-1)
{
return str1;
}
else
{
return str1.SubString(0,index);
}

解决方案 »

  1.   

    function StrClr(StrSearch as string) as string         dim MyPos as integer
             dim StrClear as string         MyPos=InStr(StrSearch,"(")
             if Mypos>0
                Strclear=left(StrSearch,Mypos-1)
             else
                StrClear=StrSearch
             end if
             
             return StrClear end function
    哈哈,我也写出来了,虽然比不上yxrj()的简练
    谢谢yxrj()