C# String Split

Split by string

string[] stringSeparators = new string[] { "/./@" };
string[] split = xPath.Split(stringSeparators, StringSplitOptions.RemoveEmptyEntries);

Split string function

/// <summary>
/// Splits a string by a string splitter
/// </summary>
/// <param name="subject"></param>
/// <param name="splitter"></param>
/// <param name="options"></param>
/// <returns></returns>
public static string[] SplitString(string subject, string splitter, StringSplitOptions options)
{
    string[] stringSeparators = new string[] { splitter };
    string[] split = subject.Split(stringSeparators, StringSplitOptions.RemoveEmptyEntries);

    return split;
}


Datenschutzerklärung | Impressum