Remove the last comma of the biosAttrStr value

If the attribute value of biosAttrStr ends with a comma, remove it.

Tested:
Without this patch:
biosAttrStr = "element1=lid1,element2=lid2,elementN=lidN,"
With this patch:
biosAttrStr = "element1=lid1,element2=lid2,elementN=lidN"

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I159f9c1774f4cd56ab04398fdf2f90929cd7e7e0
diff --git a/functions.cpp b/functions.cpp
index db7f529..98d8845 100644
--- a/functions.cpp
+++ b/functions.cpp
@@ -367,6 +367,12 @@
         }
     }
 
+    // Delete the last comma of the bios attribute string
+    if (biosAttrStr.back() == ',')
+    {
+        return biosAttrStr.substr(0, biosAttrStr.length() - 1);
+    }
+
     return biosAttrStr;
 }