Strings representation inside the Mono runtime.
All of the operations on strings are done on pointers to MonoString objects, like this:
Strings are bound to a particular application domain, which is why it is necessary to pass a MonoDomain argument as the first parameter to all the constructor functions.
Typically, you want to create the strings on the current application domain, so a call to mono_domain_get() is sufficient.
These routines are used when coping with strings that come from Mono's environment, and might be encoded in one or more of the external encodings.
For example, some file systems might historically contain a mix of file names with both old and new encodings, typically UTF8 for new files, and the old files would be encoded in an 8 bit character set (ISO-8859-1 for example).
These routines try a number of encodings, those specified in the MONO_ENCODINGS environment variable and return unicode strings that can be used internally.
See the mono(1) man page for more details.