From ca871a3193a03d01323244e5499fbda41ae17108 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 4 Apr 2007 10:15:27 +0000 Subject: 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 --- pjlib-util/include/pjlib-util/scanner.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'pjlib-util/include') 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. -- cgit v1.2.3