using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace IDS.Rapport.Dell.Helpers
{
class StringHelper
{
public static string Between(string Text, string FirstString, string LastString)
{
string STR = Text;
string STRFirst = FirstString;
string STRLast = LastString;
string FinalString;
int Pos1 = STR.IndexOf(FirstString) + FirstString.Length;
int Pos2 = STR.IndexOf(LastString);
FinalString = STR.Substring(Pos1, Pos2 - Pos1);
return FinalString;
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace IDS.Rapport.Dell.Helpers
{
class StringHelper
{
public static string Between(string Text, string FirstString, string LastString)
{
string STR = Text;
string STRFirst = FirstString;
string STRLast = LastString;
string FinalString;
int Pos1 = STR.IndexOf(FirstString) + FirstString.Length;
int Pos2 = STR.IndexOf(LastString);
FinalString = STR.Substring(Pos1, Pos2 - Pos1);
return FinalString;
}
}
}
Calling these functions
1. Between
ResponseText = StringHelper.Between(ResponseText,FirstString,LastString);
No comments:
Post a Comment