C#取字符串左边

二狗2012/02/19发布
cs

csharp
public static string GetLeft(string str, string s)
{
    string temp = str.Substring(0, str.IndexOf(s));
    return temp;
}