-#include <Base.h>\r
-#include <UefiBaseTypes.h>\r
-#include <BaseLib.h>\r
-#include <PcdLib.h>\r
-#include <CommonLib.h>\r
-#define _gPcd_FixedAtBuild_PcdMaximumUnicodeStringLength 0\r
-#define _gPcd_FixedAtBuild_PcdMaximumAsciiStringLength 0\r
+\r
+#include <Common/UefiBaseTypes.h>\r
+\r
+#include "CommonLib.h"\r
+\r
+/**\r
+ Returns the length of a Null-terminated Unicode string.\r
+\r
+ This function returns the number of Unicode characters in the Null-terminated\r
+ Unicode string specified by String.\r
+\r
+ If String is NULL, then ASSERT().\r
+\r
+ @param String Pointer to a Null-terminated Unicode string.\r
+\r
+ @return The length of String.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+StrLen (\r
+ IN CONST CHAR16 *String\r
+ )\r
+{\r
+ UINTN Length;\r
+\r
+ ASSERT (String != NULL);\r
+\r
+ for (Length = 0; *String != L'\0'; String++, Length++) {\r
+ ;\r
+ }\r
+ return Length;\r
+}\r
+\r
+/**\r
+ Returns the length of a Null-terminated ASCII string.\r
+\r
+ This function returns the number of ASCII characters in the Null-terminated\r
+ ASCII string specified by String.\r
+\r
+ If String is NULL, then ASSERT().\r
+\r
+ @param String Pointer to a Null-terminated ASCII string.\r
+\r
+ @return The length of String.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+AsciiStrLen (\r
+ IN CONST CHAR8 *String\r
+ )\r
+{\r
+ UINTN Length;\r
+\r
+ ASSERT (String != NULL);\r
+\r
+ for (Length = 0; *String != '\0'; String++, Length++) {\r
+ ;\r
+ }\r
+ return Length;\r
+}\r