/* This function only works for ASL NameStrings/pathnames. ASL NameStrings/pathnames are at most 4 chars long. */
BOOLEAN EFIAPI AslIsNameSeg(IN CONST CHAR8 *AslBuffer, OUT UINT32 *Size)
/* This function only works for ASL NameStrings/pathnames. ASL NameStrings/pathnames are at most 4 chars long. */
BOOLEAN EFIAPI AslIsNameSeg(IN CONST CHAR8 *AslBuffer, OUT UINT32 *Size)
{
  UINT32  Index;
  if ((AslBuffer == NULL) ||
      (Size == NULL))
  {
    return FALSE;
  }
  if (!AmlIsLeadNameChar (AslBuffer[0])) {
    return FALSE;
  }
  for (Index = 1; Index < AML_NAME_SEG_SIZE; Index++) {
    if ((AslBuffer[Index] == '.')   ||
        (AslBuffer[Index] == '\0'))
    {
      *Size = Index;
      return TRUE;
    } else if (!AmlIsNameChar (AslBuffer[Index])) {
      return FALSE;
    }
  }
  *Size = Index;
  return TRUE;
}