Answers for "get text between two strings c#"

C#
0

get text between two strings c#

public string Between(string STR , string FirstString, string LastString)
    {       
        string FinalString;     
        int Pos1 = STR.IndexOf(FirstString) + FirstString.Length;
        int Pos2 = STR.IndexOf(LastString);
        FinalString = STR.Substring(Pos1, Pos2 - Pos1);
        return FinalString;
    }
Posted by: Guest on August-25-2021

Code answers related to "get text between two strings c#"

C# Answers by Framework

Browse Popular Code Answers by Language