/* Update the progress string through the offset value. */
EFI_STRING UpdateProgress(IN UINTN Offset, IN EFI_STRING Configuration)
/* Update the progress string through the offset value. */
EFI_STRING UpdateProgress(IN UINTN Offset, IN EFI_STRING Configuration)
{
  UINTN       Length;
  EFI_STRING  StringPtr;
  EFI_STRING  ReturnString;
  StringPtr    = NULL;
  ReturnString = NULL;
  Length = StrLen (L"&OFFSET=") + 4 + 1;
  StringPtr = AllocateZeroPool (Length * sizeof (CHAR16));
  if (StringPtr == NULL) {
    return NULL;
  }
  UnicodeSPrint (
    StringPtr,
    (8 + 4 + 1) * sizeof (CHAR16),
    L"&OFFSET=%04x",
    Offset
    );
  ReturnString = StrStr (Configuration, StringPtr);
  if (ReturnString == NULL) {
    HiiToLower (StringPtr);
    ReturnString = StrStr (Configuration, StringPtr);
  }
  FreePool (StringPtr);
  return ReturnString;
}