+/**\r
+ Handle stings for SFO Output with escape character ^ in a string\r
+ 1. Quotation marks in the string must be escaped by using a ^ character (i.e. ^\94). \r
+ 2. The ^ character may be inserted using ^^.\r
+\r
+ @param[in] String The Unicode NULL-terminated string.\r
+ \r
+ @retval NewString The new string handled for SFO.\r
+**/\r
+EFI_STRING\r
+HandleStringWithEscapeCharForParse (\r
+ IN CHAR16 *String\r
+ )\r
+{\r
+ EFI_STRING NewStr;\r
+ EFI_STRING StrWalker;\r
+ EFI_STRING ReturnStr;\r
+\r
+ if (String == NULL) {\r
+ return NULL;\r
+ }\r
+ \r
+ //\r
+ // start to parse the input string.\r
+ //\r
+ NewStr = AllocateZeroPool (StrSize (String));\r
+ if (NewStr == NULL) {\r
+ return NULL;\r
+ }\r
+ ReturnStr = NewStr;\r
+ StrWalker = String;\r
+ while (*StrWalker != CHAR_NULL) {\r
+ if (*StrWalker == L'^' && (*(StrWalker + 1) == L'^' || *(StrWalker + 1) == L'"')) {\r
+ *NewStr = *(StrWalker + 1);\r
+ StrWalker++;\r
+ } else {\r
+ *NewStr = *StrWalker;\r
+ }\r
+ StrWalker++;\r
+ NewStr++;\r
+ }\r
+ \r
+ return ReturnStr;\r
+}\r
+\r
+\r