Rewrite TWRP fstab flag processing

* Do not flip/flop between std::string and char* when no std::string
  specific functions are applied.
* Remove the need to manually count flag string lengths
* Move checks for Display_Name, Storage_Name, and Backup_Display_Name
  out of flag processing

Change-Id: I24d432c222124012b2a98d27598e42d0944f7da2
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 8d85ccf..1c633e7 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -305,6 +305,13 @@
 	return res;
 }
 
+void TWFunc::Strip_Quotes(char* &str) {
+	if (strlen(str) > 0 && str[0] == '\"')
+		str++;
+	if (strlen(str) > 0 && str[strlen(str)-1] == '\"')
+		str[strlen(str)-1] = 0;
+}
+
 vector<string> TWFunc::split_string(const string &in, char del, bool skip_empty) {
 	vector<string> res;