http://bugzilla.novell.com/show_bug.cgi?id=605340
http://bugzilla.novell.com/show_bug.cgi?id=605340#c1 --- Comment #1 from Matthew Smit <[email protected]> 2010-07-03 00:37:17 UTC --- This should do it. Haven't had a chance to fully run tests on it yet. Index: String.cs=================================================================== --- String.cs (revision 158670) +++ String.cs (working copy) public int LastIndexOf (string value, StringComparison comparisonType) { if (this.Length == 0) - return value == String.Empty ? 0 : -1; + return value == -1; else return LastIndexOf (value, this.Length - 1, this.Length, comparisonType); } public int LastIndexOf (char value, int startIndex, int count) { - if (startIndex == 0 && this.length == 0) + if (this.length == 0) return -1; // >= for char (> for string) if ((startIndex < 0) || (startIndex >= this.Length)) throw new ArgumentOutOfRangeException ("startIndex", "< 0 || >= this.Length"); if ((count < 0) || (count > this.Length)) throw new ArgumentOutOfRangeException ("count", "< 0 || > this.Length"); if (startIndex - count + 1 < 0) throw new ArgumentOutOfRangeException ("startIndex - count + 1 < 0"); return LastIndexOfUnchecked (value, startIndex, count); } -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
