AvalonStudio.TextEditor.Utils.CharRope.LastIndexOf C# (CSharp) 메소드

LastIndexOf() 공개 정적인 메소드

Gets the index of the last occurrence of the search text.
public static LastIndexOf ( this rope, string searchText, int startIndex, int length, System.StringComparison comparisonType ) : int
rope this
searchText string
startIndex int
length int
comparisonType System.StringComparison
리턴 int
		public static int LastIndexOf(this Rope<char> rope, string searchText, int startIndex, int length,
			StringComparison comparisonType)
		{
			if (rope == null)
				throw new ArgumentNullException("rope");
			if (searchText == null)
				throw new ArgumentNullException("searchText");
			rope.VerifyRange(startIndex, length);
			var pos = rope.ToString(startIndex, length).LastIndexOf(searchText, comparisonType);
			if (pos < 0)
				return -1;
			return pos + startIndex;
		}
	}