/* Base on the input option string to update the skip value for a menu option. */
VOID UpdateSkipInfoForMenu(IN UI_MENU_OPTION *MenuOption, IN CHAR16 *OptionString)
/* Base on the input option string to update the skip value for a menu option. */
VOID UpdateSkipInfoForMenu(IN UI_MENU_OPTION *MenuOption, IN CHAR16 *OptionString)
{
  UINTN   Index;
  UINT16  Width;
  UINTN   Row;
  CHAR16  *OutputString;
  UINT16  GlyphWidth;
  Width      = (UINT16)gOptionBlockWidth - 1;
  GlyphWidth = 1;
  Row        = 1;
  for (Index = 0; GetLineByWidth (OptionString, Width, &GlyphWidth, &Index, &OutputString) != 0x0000;) {
    if (StrLen (&OptionString[Index]) != 0) {
      Row++;
    }
    FreePool (OutputString);
  }
  if ((Row > MenuOption->Skip) &&
      (MenuOption->ThisTag->OpCode->OpCode != EFI_IFR_DATE_OP) &&
      (MenuOption->ThisTag->OpCode->OpCode != EFI_IFR_TIME_OP))
  {
    MenuOption->Skip = Row;
  }
}