Loyc.StringBuilderExt.IndexOf C# (CSharp) Method

IndexOf() public static method

Gets the index of a substring in a StringBuilder
public static IndexOf ( this sb, UString searchStr, int startIndex, bool ignoreCase = false ) : int
sb this
searchStr UString
startIndex int
ignoreCase bool
return int
		public static int IndexOf(this StringBuilder sb, UString searchStr, int startIndex = 0, bool ignoreCase = false)
		{
			var stopAt = sb.Length - searchStr.Length;
			for (int i = startIndex; i <= stopAt; i++)
				if (SubstringEqualHelper(sb, i, searchStr, ignoreCase))
					return i;
			return -1;
		}

Same methods

StringBuilderExt::IndexOf ( this sb, char value, int startIndex ) : int