/* If String is NULL, then ASSERT(). If String is not aligned on a 16-bit boundary, then ASSERT(). If PcdMaximumUnicodeStringLength is not zero, and String contains more than PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator, then ASSERT(). */
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
/* If String is NULL, then ASSERT(). If String is not aligned on a 16-bit boundary, then ASSERT(). If PcdMaximumUnicodeStringLength is not zero, and String contains more than PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator, then ASSERT(). */
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
{
  UINTN  Length;
  ASSERT (String != NULL);
  ASSERT (((UINTN)String & BIT0) == 0);
  for (Length = 0; *String != L'\0'; String++, Length++) {
    if (PcdGet32 (PcdMaximumUnicodeStringLength) != 0) {
      ASSERT (Length < PcdGet32 (PcdMaximumUnicodeStringLength));
    }
  }
  return Length;
}