Dear all, how do I get to peek at the source code for any of the algorithms of .NET? In particular, I'd like to take a look at the unicode normalization algorithm... I'm using Mono in Ubuntu.
views:
42answers:
1
+4
A:
From the Mono website:
The Mono source code is hosted on GitHub using the Git source code control system for all of its source code.
[...]
If all you need is to browse the sources, you can go to Mono Organization page on GitHub.
The String Class is in the mscorlib assembly. You can find it in /mcs/class/corlib/System/String.cs.
String.Normalize looks like this:
public string Normalize ()
{
return Normalization.Normalize (this, 0);
}
public string Normalize (NormalizationForm normalizationForm)
{
switch (normalizationForm) {
default:
return Normalization.Normalize (this, 0);
case NormalizationForm.FormD:
return Normalization.Normalize (this, 1);
case NormalizationForm.FormKC:
return Normalization.Normalize (this, 2);
case NormalizationForm.FormKD:
return Normalization.Normalize (this, 3);
}
}
The internal Normalization class is in /mcs/class/corlib/Mono.Globalization.Unicode/Normalization.cs.
dtb
2010-09-22 14:04:32