/// <summary> /// Determines whether the character at index of specified string is an argument start character. /// </summary> /// <param name="s">The string.</param> /// <param name="index">The index.</param> /// <returns> /// <c>true</c> if the character is an argument start character; otherwise, <c>false</c>. /// </returns> protected bool IsOptionStart(string s, int index) { return(OptionPrefixes.Contains(s[index])); }
/// <summary> /// Determines whether the string at the index is the start of an long option. /// </summary> /// <param name="s">The string.</param> /// <param name="index">The index.</param> /// <returns> /// <c>true</c> if it is a long argument start; otherwise, <c>false</c>. /// </returns> protected bool IsLongOption(string s, int index) { return(((index + 1) < s.Length) && OptionPrefixes.Contains(s[index + 1]) && s[index].Equals(s[index + 1])); }