/** @file\r
Unicode string primatives.\r
\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
+Copyright (c) 2004-2006 Intel Corporation. All rights reserved\r
+This software and associated documentation (if any) is furnished\r
+under a license and may only be used or copied in accordance\r
+with the terms of the license. Except as permitted by such\r
+license, no part of this software or documentation may be\r
+reproduced, stored in a retrieval system, or transmitted in any\r
+form or by any means without the express written consent of\r
+Intel Corporation.\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\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
+\r
/**\r
Copies one Null-terminated Unicode string to another Null-terminated Unicode\r
string and returns the new Unicode string.\r
return ReturnValue;\r
}\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 size of a Null-terminated Unicode string in bytes, including the\r
Null terminator.\r
return ReturnValue;\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
-\r
/**\r
Returns the size of a Null-terminated ASCII string in bytes, including the\r
Null terminator.\r