TwitCore/Helpers/StringHandler.cs
/// <summary>
/// This is used to determine the start and end index of a word in a string.
/// </summary>
/// <param name="Text">String to find the word in.</param>
/// <param name="Keyword">Keyword to look for in the string.</param>
/// <returns>Returns a tuple with the start and end index of the keyword.</returns>
This is used to determine the start and end index of a word in a string.
This is used to determine the start and end index of a word in a string .
public static Tuple<int, int> GetStartEnd(this string Text, string Keyword) {
            var start = Text.IndexOf(Keyword);
            if (start > -1)
                return new Tuple<int, int>(start, Keyword.Length + start);
            else
                return new Tuple<int, int>(0, 0);
        }
public static Tuple < int , int > GetStartEnd ( this string Text , string Keyword ) { var start = Text . IndexOf ( Keyword ) ; if ( start > - 1 ) return new Tuple < int , int > ( start , Keyword . Length + start ) ; else return new Tuple < int , int > ( 0 , 0 ) ; }
This is used to determine the start and end index of a word in a string.
This is used to determine the start and end index of a word in a string .
Returns a tuple with the start and end index of the keyword.
Returns a tuple with the start and end index of the keyword .
string
this
Keyword
string
Keyword to look for in the string.
Keyword to look for in the string .
Text
String to find the word in.
String to find the word in .