public int IndexOf()

in csharp/src/Containers/MutableString.cs [2453:2492]


		public int IndexOf(MutableString item, StringComparison comparisonType)
		{
			if (comparisonType == StringComparison.Ordinal)
			{
				for (int i = 0; i <= _length - item.Length; i++)
				{
					bool equals = true;
					for (int j = 0; j < item.Length; j++)
						if (item[j] != _data[i + j])
						{
							equals = false;
							break;
						}
					if (equals)
						return i;
				}
				return -1;
			}
			else if (comparisonType == StringComparison.OrdinalIgnoreCase)
			{
				for (int i = 0; i <= _length - item.Length; i++)
				{
					bool equals = true;
					for (int j = 0; j < item.Length; j++)
						if (Char.ToLower(item[j]) != Char.ToLower(_data[i + j]))
						{
							equals = false;
							break;
						}
					if (equals)
						return i;
				}
				return -1;

			}
			else
			{
				return ToString().IndexOf(item.ToString(), comparisonType);
			}
		}