elif Value == 'FALSE' or Value == '0':\r
Value = '0'\r
return Value\r
+## Get the integer value from string like "14U" or integer like 2\r
+#\r
+# @param Input The object that may be either a integer value or a string\r
+#\r
+# @retval Value The integer value that the input represents\r
+#\r
+def GetIntegerValue(Input):\r
+ if type(Input) in (int, long):\r
+ return Input\r
+ String = Input\r
+ if String.endswith("U"):\r
+ String = String[:-1]\r
+ if String.endswith("ULL"):\r
+ String = String[:-3]\r
+ if String.endswith("LL"):\r
+ String = String[:-2]\r
+\r
+ if String.startswith("0x") or String.startswith("0X"):\r
+ return int(String, 16)\r
+ elif String == '':\r
+ return 0\r
+ else:\r
+ return int(String)\r
\r
##\r
#\r