/* Eliminate the extra spaces in the Str to one space. */
VOID BmEliminateExtraSpaces(IN CHAR16 *Str)
/* Eliminate the extra spaces in the Str to one space. */
VOID BmEliminateExtraSpaces(IN CHAR16 *Str)
{
  UINTN  Index;
  UINTN  ActualIndex;
  for (Index = 0, ActualIndex = 0; Str[Index] != L'\0'; Index++) {
    if ((Str[Index] != L' ') || ((ActualIndex > 0) && (Str[ActualIndex - 1] != L' '))) {
      Str[ActualIndex++] = Str[Index];
    }
  }
  Str[ActualIndex] = L'\0';
}