[Mono-dev] [PATCH] String.Split() broken behavior

Robert Jordan robertj at gmx.net
Sun Oct 7 09:45:19 EDT 2007


Tyler Larson wrote:
> For what its worth, I would suspect that this function is probably the 
> fastest basic tokenization mechanism available though the class 
> libraries. The reason why I found the bugs in this code to begin with is 
> because I always used this method to tokenize input strings. Indeed, I'm 
> surprised that these bugs went unnoticed and unrepaired for so long 
> (literally years) for such a critical core component as the system 
> string library.

Frankly, these are pretty recently implemented 2.0 overloads of the
Split method. They are seldom used in the mono class libs. Especially
the buggy overload with the "count" parameter is never used.

Obviously, user code is also seldom using these overloads, otherwise
the bug might have been found earlier.

Thanks for the patch.

Robert




More information about the Mono-devel-list mailing list