]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/Library/StringUtils.py
BaseTools: Handle the bytes and str difference
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Library / StringUtils.py
index 2be382fa1797041fee13bf8e31323311237496a6..c2148a44fb078b35c37c79c93f98c37d7b4ca001 100644 (file)
@@ -680,9 +680,7 @@ def GetHelpTextList(HelpTextClassList):
 # @param String: the source string\r
 #\r
 def StringArrayLength(String):\r
-    if isinstance(String, unicode):\r
-        return (len(String) + 1) * 2 + 1\r
-    elif String.startswith('L"'):\r
+    if String.startswith('L"'):\r
         return (len(String) - 3 + 1) * 2\r
     elif String.startswith('"'):\r
         return (len(String) - 2 + 1)\r