If Source is NULL, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ PcdMaximumUnicodeStringLength Unicode characters not including the \r
+ Null-terminator, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
@param Source Pointer to a Null-terminated Unicode string.\r
If Source is NULL, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ PcdMaximumUnicodeStringLength Unicode characters not including the \r
+ Null-terminator, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
@param Source Pointer to a Null-terminated Unicode string.\r
\r
If String is NULL, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and String contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ PcdMaximumUnicodeStringLength Unicode characters not including the \r
+ Null-terminator, then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
\r
// If PcdMaximumUnicodeStringLength is not zero,\r
// length should not more than PcdMaximumUnicodeStringLength\r
//\r
- if (FixedPcdGet32 (PcdMaximumUnicodeStringLength) != 0) {\r
- ASSERT (Length < FixedPcdGet32 (PcdMaximumUnicodeStringLength));\r
+ if (PcdGet32 (PcdMaximumUnicodeStringLength) != 0) {\r
+ ASSERT (Length < PcdGet32 (PcdMaximumUnicodeStringLength));\r
}\r
}\r
return Length;\r
\r
If String is NULL, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and String contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ PcdMaximumUnicodeStringLength Unicode characters not including the \r
+ Null-terminator, then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and FirstString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ than PcdMaximumUnicodeStringLength Unicode characters not including the \r
+ Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and SecondString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ than PcdMaximumUnicodeStringLength Unicode characters not including the \r
+ Null-terminator, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated Unicode string.\r
@param SecondString Pointer to a Null-terminated Unicode string.\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and FirstString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and SecondString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ Null-terminator, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated Unicode string.\r
@param SecondString Pointer to a Null-terminated Unicode string.\r
If Source is NULL, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Destination contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and concatenating Destination\r
and Source results in a Unicode string with more than\r
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ Null-terminator, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
@param Source Pointer to a Null-terminated Unicode string.\r
If Source is NULL, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Destination contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and concatenating Destination\r
and Source results in a Unicode string with more than\r
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+ PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ Null-terminator, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
@param Source Pointer to a Null-terminated Unicode string.\r
If Source is NULL, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and Source contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated ASCII string.\r
@param Source Pointer to a Null-terminated ASCII string.\r
If Source is NULL, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero, and Source contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated ASCII string.\r
@param Source Pointer to a Null-terminated ASCII string.\r
\r
If String is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and String contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
\r
@param String Pointer to a Null-terminated ASCII string.\r
\r
// If PcdMaximumUnicodeStringLength is not zero,\r
// length should not more than PcdMaximumUnicodeStringLength\r
//\r
- if (FixedPcdGet32 (PcdMaximumAsciiStringLength) != 0) {\r
- ASSERT (Length < FixedPcdGet32 (PcdMaximumAsciiStringLength));\r
+ if (PcdGet32 (PcdMaximumAsciiStringLength) != 0) {\r
+ ASSERT (Length < PcdGet32 (PcdMaximumAsciiStringLength));\r
}\r
}\r
return Length;\r
\r
If String is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and String contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
\r
@param String Pointer to a Null-terminated ASCII string.\r
\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and FirstString contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and SecondString contains more\r
- than PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ than PcdMaximumAsciiStringLength ASCII characters not including the\r
+ Null-terminator, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated ASCII string.\r
@param SecondString Pointer to a Null-terminated ASCII string.\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and FirstString contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and SecondString contains more\r
- than PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ than PcdMaximumAsciiStringLength ASCII characters not including the\r
+ Null-terminator, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated ASCII string.\r
@param SecondString Pointer to a Null-terminated ASCII string.\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and FirstString contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero and SecondString contains more\r
- than PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
+ If PcdMaximumAsciiStringLength is not zero and SecondString contains more than\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated ASCII string.\r
@param SecondString Pointer to a Null-terminated ASCII string.\r
IN UINTN Length\r
)\r
{\r
+ if (Length == 0) {\r
+ return 0;\r
+ }\r
+\r
//\r
// ASSERT both strings are less long than PcdMaximumAsciiStringLength\r
//\r
If Destination is NULL, then ASSERT().\r
If Source is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and Destination contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and Source contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and concatenating Destination and\r
Source results in a ASCII string with more than PcdMaximumAsciiStringLength\r
ASCII characters, then ASSERT().\r
If Destination is NULL, then ASSERT().\r
If Source is NULL, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero, and Destination contains more\r
- than PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ If PcdMaximumAsciiStringLength is not zero, and Destination contains more than\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero, and Source contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero, and concatenating Destination and\r
Source results in a ASCII string with more than PcdMaximumAsciiStringLength\r
- ASCII characters, then ASSERT().\r
+ ASCII characters not including the Null-terminator, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated ASCII string.\r
@param Source Pointer to a Null-terminated ASCII string.\r