summaryrefslogtreecommitdiff
path: root/pjlib-util/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-04-04 10:15:27 +0000
committerBenny Prijono <bennylp@teluu.com>2007-04-04 10:15:27 +0000
commitca871a3193a03d01323244e5499fbda41ae17108 (patch)
tree6027887697a9fabc75c405dcaa57e7f3b1ff1b32 /pjlib-util/include
parentaafa82d9e93387af71d2332d0a3d42222b17d0ec (diff)
Ticket #208: Allow single quotes for attributes in XML (thanks Tory Patnoe)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1145 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib-util/include')
-rw-r--r--pjlib-util/include/pjlib-util/scanner.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/pjlib-util/include/pjlib-util/scanner.h b/pjlib-util/include/pjlib-util/scanner.h
index b9812eca..71c4eb8e 100644
--- a/pjlib-util/include/pjlib-util/scanner.h
+++ b/pjlib-util/include/pjlib-util/scanner.h
@@ -350,6 +350,29 @@ PJ_DECL(void) pj_scan_get_quote( pj_scanner *scanner,
pj_str_t *out);
/**
+ * Get characters between quotes. If current input doesn't match begin_quote,
+ * syntax error will be thrown. Note that the resulting string will contain
+ * the enclosing quote.
+ *
+ * @param scanner The scanner.
+ * @param begin_quotes The character array to begin the quotes. For example,
+ * the two characters " and '.
+ * @param end_quotes The character array to end the quotes. The position
+ * found in the begin_quotes array will be used to match
+ * the end quotes. So if the begin_quotes was the array
+ * of "'< the end_quotes should be "'>. If begin_array
+ * matched the ' then the end_quotes will look for ' to
+ * match at the end.
+ * @param qsize The size of the begin_quotes and end_quotes arrays.
+ * @param out String to store the result.
+ */
+PJ_DECL(void) pj_scan_get_quotes(pj_scanner *scanner,
+ const char *begin_quotes,
+ const char *end_quotes, int qsize,
+ pj_str_t *out);
+
+
+/**
* Get N characters from the scanner.
*
* @param scanner The scanner.