summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-05-11 12:42:12 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-05-13 11:42:00 +0200
commit4ce9b5a1023be2e931d4205ed17f44f135c920d1 (patch)
treea8fdee5c427d6c0b4e907e4b902d751e69fe972f /include
parentae9780583c18c949bf975131a24eb8b8361ddbf6 (diff)
downloadmupdf-4ce9b5a1023be2e931d4205ed17f44f135c920d1.tar.xz
Add common page range parsing function for tools.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz/string.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mupdf/fitz/string.h b/include/mupdf/fitz/string.h
index 8daa28fc..2af6ba93 100644
--- a/include/mupdf/fitz/string.h
+++ b/include/mupdf/fitz/string.h
@@ -136,4 +136,11 @@ float fz_strtof_no_exp(const char *string, char **tailptr);
*/
int fz_grisu(float f, char *s, int *exp);
+/*
+ Check and parse string into page ranges:
+ ( ','? ([0-9]+|'N') ( '-' ([0-9]+|N) )? )+
+*/
+int fz_is_page_range(fz_context *ctx, const char *s);
+const char *fz_parse_page_range(fz_context *ctx, const char *s, int *a, int *b, int n);
+
#endif