+/**
+ A temparaty function that returns the size of a Null-terminated Unicode
+ string in bytes, including the Null terminator.
+
+ This function returns the size, in bytes, of the Null-terminated Unicode
+ string specified by String. It duplicates the functionality of StrSize()
+ in MDE library, but avoids using PCD, because IPF currently cannot convert
+ address of global variable for runtime.
+
+ If String is NULL, then ASSERT().
+ If String is not aligned on a 16-bit boundary, then ASSERT().
+
+ @param String Pointer to a Null-terminated Unicode string.
+
+ @return The size of String.
+
+**/
+STATIC
+UINTN
+StrSizeOfVariableName (
+ IN CONST CHAR16 *String
+ )
+{
+ UINTN Length;
+
+ ASSERT (String != NULL);
+ ASSERT (((UINTN) String & 0x01) == 0);
+
+ for (Length = 0; *String != L'\0'; String++, Length++);
+
+ return (Length + 1) * sizeof (*String);
+}
+\r