[Mono-devel-list] String.GetIndexOf() and globalization

Marcus mathpup at mylinuxisp.com
Fri Jul 30 19:58:25 EDT 2004

We have noticed that Mono's String.GetIndexOf() is not working property. We 
are calling s.GetIndexOf("::"), and various strings for s produce different 
results, even though they all contain the substring "::".  Sometimes, 
GetIndexOf completely fails to find the "::", when multiple instances of "::" 
are present, sometimes Mono finds the wrong one (i.e. not the last one), and 
sometimes it actually finds the correct one.

There's already a bug report about it. The documentation says that this is 
supposed to be a culture-aware comparison. I'm wondering if there is 
something special about the string "::" in terms of culture-sensitive 
comparison and ICU.

I was trying the track down the problem, and I saw that eventually, one of the 
functions in locales.c was called. My knowlege of ICU is very limited, 

More information about the Mono-devel-list mailing list