+/**\r
+ Print at a specific location on the screen.\r
+\r
+ This function will move the cursor to a given screen location and print the specified string.\r
+ \r
+ If -1 is specified for either the Row or Col the current screen location for BOTH \r
+ will be used.\r
+\r
+ If either Row or Col is out of range for the current console, then ASSERT.\r
+ If Format is NULL, then ASSERT.\r
+\r
+ In addition to the standard %-based flags as supported by UefiLib Print() this supports \r
+ the following additional flags:\r
+ %N - Set output attribute to normal.\r
+ %H - Set output attribute to highlight.\r
+ %E - Set output attribute to error.\r
+ %B - Set output attribute to blue color.\r
+ %V - Set output attribute to green color.\r
+\r
+ Note: The background color is controlled by the shell command cls.\r
+\r
+ @param[in] Row The row to print at.\r
+ @param[in] Col The column to print at.\r
+ @param[in] HiiFormatStringId The format string Id for getting from Hii.\r
+ @param[in] HiiFormatHandle The format string Handle for getting from Hii.\r
+\r
+ @return the number of characters printed to the screen.\r
+**/\r
+UINTN\r
+EFIAPI\r
+ShellPrintHiiEx(\r
+ IN INT32 Col OPTIONAL,\r
+ IN INT32 Row OPTIONAL,\r
+ IN CONST EFI_STRING_ID HiiFormatStringId,\r
+ IN CONST EFI_HANDLE HiiFormatHandle,\r
+ ...\r
+ );\r
+\r
+/**\r
+ Function to determine if a given filename represents a directory.\r
+\r
+ If DirName is NULL, then ASSERT.\r
+\r
+ @param[in] DirName Path to directory to test.\r
+\r
+ @retval EFI_SUCCESS The Path represents a directory.\r
+ @retval EFI_NOT_FOUND The Path does not represent a directory.\r
+ @retval other The path failed to open.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ShellIsDirectory(\r
+ IN CONST CHAR16 *DirName\r
+ );\r
+\r
+/**\r
+ Function to determine if a given filename represents a file.\r
+\r
+ This will search the CWD only.\r
+\r
+ If Name is NULL, then ASSERT.\r
+\r
+ @param[in] Name Path to file to test.\r
+\r
+ @retval EFI_SUCCESS The Path represents a file.\r
+ @retval EFI_NOT_FOUND The Path does not represent a file.\r
+ @retval other The path failed to open.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ShellIsFile(\r
+ IN CONST CHAR16 *Name\r
+ );\r
+\r
+/**\r
+ Function to determine if a given filename represents a file.\r
+\r
+ This will search the CWD and then the Path.\r
+\r
+ If Name is NULL, then ASSERT.\r
+\r
+ @param[in] Name Path to file to test.\r
+\r
+ @retval EFI_SUCCESS The Path represents a file.\r
+ @retval EFI_NOT_FOUND The Path does not represent a file.\r
+ @retval other The path failed to open.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ShellIsFileInPath(\r
+ IN CONST CHAR16 *Name\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.\r
+\r
+ @param[in] String String representation of a number\r
+\r
+ @return The unsigned integer result of the conversion.\r
+**/\r
+UINTN\r
+EFIAPI\r
+ShellStrToUintn(\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
+\r
+ Append the first D characters of Source to the end of Destination, where D is \r
+ the lesser of Count and the StrLen() of Source. If appending those D characters \r
+ will fit within Destination (whose Size is given as CurrentSize) and \r
+ still leave room for a null terminator, then those characters are appended, \r
+ starting at the original terminating null of Destination, and a new terminating \r
+ null is appended.\r
+\r
+ If appending D characters onto Destination will result in a overflow of the size\r
+ given in CurrentSize the string will be grown such that the copy can be performed\r
+ and CurrentSize will be updated to the new size.\r
+\r
+ If Source is NULL, there is nothing to append, just return the current buffer in \r
+ Destination.\r
+\r
+ If Destination is NULL, then ASSERT().\r
+ If Destination's current length (including NULL terminator) is already more than \r
+ CurrentSize, then ASSERT().\r
+\r
+ @param[in,out] Destination The String to append onto.\r
+ @param[in,out] CurrentSize On call the number of bytes in Destination. On \r
+ return possibly the new size (still in bytes). If NULL\r
+ then allocate whatever is needed.\r
+ @param[in] Source The String to append from.\r
+ @param[in] Count Maximum number of characters to append. If 0 then \r
+ all are appended.\r
+\r
+ @return The Destination after apending the Source.\r
+**/\r
+CHAR16* \r
+EFIAPI\r
+StrnCatGrow (\r
+ IN OUT CHAR16 **Destination,\r
+ IN OUT UINTN *CurrentSize,\r
+ IN CONST CHAR16 *Source,\r
+ IN UINTN Count\r
+ );\r
+\r
+/**\r
+ This is a find and replace function. Upon successful return the NewString is a copy of \r
+ SourceString with each instance of FindTarget replaced with ReplaceWith.\r
+\r
+ If SourceString and NewString overlap the behavior is undefined.\r
+\r
+ If the string would grow bigger than NewSize it will halt and return error.\r
+\r
+ @param[in] SourceString String with source buffer.\r
+ @param[in,out] NewString String with resultant buffer.\r
+ @param[in] NewSize Size in bytes of NewString.\r
+ @param[in] FindTarget String to look for.\r
+ @param[in] ReplaceWith String to replace FindTarget with.\r
+\r
+ @retval EFI_INVALID_PARAMETER SourceString was NULL.\r
+ @retval EFI_INVALID_PARAMETER NewString was NULL.\r
+ @retval EFI_INVALID_PARAMETER FindTarget was NULL.\r
+ @retval EFI_INVALID_PARAMETER ReplaceWith was NULL.\r
+ @retval EFI_INVALID_PARAMETER FindTarget had length < 1.\r
+ @retval EFI_INVALID_PARAMETER SourceString had length < 1.\r
+ @retval EFI_BUFFER_TOO_SMALL NewSize was less than the minimum size to hold \r
+ the new string (truncation occurred).\r
+ @retval EFI_SUCCESS the string was sucessfully copied with replacement.\r
+**/\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+ShellLibCopySearchAndReplace(\r
+ IN CHAR16 CONST *SourceString,\r
+ IN CHAR16 *NewString,\r
+ IN UINTN NewSize,\r
+ IN CONST CHAR16 *FindTarget,\r
+ IN CONST CHAR16 *ReplaceWith\r
+ );\r
+\r
+/**\r
+ Check if a Unicode character is a hexadecimal character.\r
+\r
+ This internal function checks if a Unicode character is a \r
+ decimal character. The valid hexadecimal character is \r
+ L'0' to L'9', L'a' to L'f', or L'A' to L'F'.\r
+\r
+ @param[in] Char The character to check.\r
+\r
+ @retval TRUE The Char is a hexadecmial character.\r
+ @retval FALSE The Char is not a hexadecmial character.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+ShellLibIsHexaDecimalDigitCharacter (\r
+ IN CHAR16 Char\r
+ );\r
+\r