aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r--src/mm-modem-helpers.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index 60d7459b..db0bfbdf 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -32,6 +32,23 @@
/*****************************************************************************/
+gchar *
+mm_strip_quotes (gchar *str)
+{
+ gsize len;
+
+ if (!str)
+ return NULL;
+
+ len = strlen (str);
+ if ((len >= 2) && (str[0] == '"') && (str[len - 1] == '"')) {
+ str[0] = ' ';
+ str[len - 1] = ' ';
+ }
+
+ return g_strstrip (str);
+}
+
const gchar *
mm_strip_tag (const gchar *str, const gchar *cmd)
{