Convert a Unicode character to numerical value. This internal function only deal with Unicode character which maps to a valid hexadecimal ASII character, i.e. L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other Unicode character, the value returned does not make sense. @param Char The character to convert. @return The numerical value converted. **/
| 611 | |
| 612 | **/ |
| 613 | UINTN |
| 614 | EFIAPI |
| 615 | InternalHexCharToUintn ( |
| 616 | IN CHAR16 Char |
| 617 | ) |
| 618 | { |
| 619 | if (InternalIsDecimalDigitCharacter (Char)) { |
| 620 | return Char - L'0'; |
| 621 | } |
| 622 | |
| 623 | return (10 + CharToUpper (Char) - L'A'); |
| 624 | } |
| 625 | |
| 626 | /** |
| 627 | Check if a Unicode character is a hexadecimal character. |
no test coverage detected