/* Convert a NULL-terminated unicode decimal VLAN ID string to VLAN ID. */
UINT16 StrToVlanId(IN CHAR16 *String)
/* Convert a NULL-terminated unicode decimal VLAN ID string to VLAN ID. */
UINT16 StrToVlanId(IN CHAR16 *String)
{
  CHAR16  *Str;
  if (String == NULL) {
    return INVALID_VLAN_ID;
  }
  Str = String;
  while ((*Str >= '0') && (*Str <= '9')) {
    Str++;
  }
  if (*Str != 0) {
    return INVALID_VLAN_ID;
  }
  return (UINT16)StrDecimalToUintn (String);
}