IN CONST CHAR16 *String\r
);\r
\r
+/**\r
+ Function return the number converted from a hex representation of a number.\r
+\r
+ Note: this function cannot be used when (UINTN)(-1), (0xFFFFFFFF) may be a valid\r
+ result. Use ShellConvertStringToUint64 instead.\r
+\r
+ @param[in] String String representation of a number.\r
+\r
+ @return The unsigned integer result of the conversion.\r
+ @retval (UINTN)(-1) An error occured.\r
+**/\r
+UINTN\r
+EFIAPI\r
+ShellHexStrToUintn(\r
+ IN CONST CHAR16 *String\r
+ );\r
+\r
/**\r
Safely append with automatic string resizing given length of Destination and\r
desired length of copy from Source.\r
return (Status);\r
}\r
\r
+/**\r
+ Function return the number converted from a hex representation of a number.\r
+\r
+ Note: this function cannot be used when (UINTN)(-1), (0xFFFFFFFF) may be a valid\r
+ result. Use ShellConvertStringToUint64 instead.\r
+\r
+ @param[in] String String representation of a number.\r
+\r
+ @return The unsigned integer result of the conversion.\r
+ @retval (UINTN)(-1) An error occured.\r
+**/\r
+UINTN\r
+EFIAPI\r
+ShellHexStrToUintn(\r
+ IN CONST CHAR16 *String\r
+ )\r
+{\r
+ UINT64 RetVal;\r
+\r
+ if (!EFI_ERROR(ShellConvertStringToUint64(String, &RetVal, TRUE, TRUE))) {\r
+ return ((UINTN)RetVal);\r
+ }\r
+ \r
+ return ((UINTN)(-1));\r
+}\r
+\r
/**\r
Function to determine whether a string is decimal or hex representation of a number\r
and return the number converted from the string. Spaces are always skipped.\r