+UINT32\r
+UnicodeStrLen (\r
+ IN CHAR16 *String\r
+ )\r
+ /*++\r
+\r
+ Routine Description:\r
+\r
+ Returns the length of a null-terminated unicode string.\r
+\r
+ Arguments:\r
+\r
+ String - The pointer to a null-terminated unicode string.\r
+\r
+ Returns:\r
+\r
+ N/A\r
+\r
+ --*/\r
+{\r
+ UINT32 Length;\r
+\r
+ for (Length = 0; *String != L'\0'; String++, Length++) {\r
+ ;\r
+ }\r
+ return Length;\r
+}\r
+\r
+VOID\r
+Unicode2AsciiString (\r
+ IN CHAR16 *Source,\r
+ OUT CHAR8 *Destination\r
+ )\r
+ /*++\r
+\r
+ Routine Description:\r
+\r
+ Convert a null-terminated unicode string to a null-terminated ascii string.\r
+\r
+ Arguments:\r
+\r
+ Source - The pointer to the null-terminated input unicode string.\r
+ Destination - The pointer to the null-terminated output ascii string.\r
+\r
+ Returns:\r
+\r
+ N/A\r
+\r
+ --*/\r
+{\r
+ while (*Source != '\0') {\r
+ *(Destination++) = (CHAR8) *(Source++);\r
+ }\r
+ //\r
+ // End the ascii with a NULL.\r
+ //\r
+ *Destination = '\0';\r
+}\r
+\r