/* This function is to convert a UINTN to a ASCII string, and return the actual length of the buffer. */
UINTN PxeBcUintnToAscDec(IN UINTN Number, IN UINT8 *Buffer, IN UINTN BufferSize)
/* This function is to convert a UINTN to a ASCII string, and return the actual length of the buffer. */
UINTN PxeBcUintnToAscDec(IN UINTN Number, IN UINT8 *Buffer, IN UINTN BufferSize)
{
  UINTN  Index;
  UINTN  Length;
  CHAR8  TempStr[64];
  Index          = 63;
  TempStr[Index] = 0;
  do {
    Index--;
    TempStr[Index] = (CHAR8)('0' + (Number % 10));
    Number         = (UINTN)(Number / 10);
  } while (Number != 0);
  AsciiStrCpyS ((CHAR8 *)Buffer, BufferSize, &TempStr[Index]);
  Length = AsciiStrLen ((CHAR8 *)Buffer);
  return Length;
}