I'm just curoius how does .ToUpper() work? Is there a some sort of mapping that a lower a have UTF code XYZ and the upper has UTF code XYZ1?
The toupper() function is used to convert lowercase alphabet to uppercase. i.e. If the character passed is a lowercase alphabet then the toupper() function converts a lowercase alphabet to an uppercase alphabet. It is defined in the ctype.
Explanation: toupper accepts a character as an argument (it actually accepts an integer, but the two are interchangeable) and will convert it to uppercase, and will return the uppercase character, in the form of an ASCII integer, and leave the parameter unchanged.
Convert string from lowercase to uppercase in R programming – toupper() function.
To convert a character to uppercase by using the casing conventions of the current culture, call the ToUpper(Char, CultureInfo) method overload with a value of CurrentCulture for its culture parameter.
Yes, it's making use of the Unicode metadata. Every character (Unicode code point) has a case as well as case mapping to upper- and lowercase (and title case). .NET uses this information to convert a string to upper- or lowercase. You can find the very same information in the Unicode Character Database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With