aboutsummaryrefslogtreecommitdiff
path: root/text-util.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-06-14 14:03:22 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-06-15 15:51:43 +0200
commit4f0c14bd3f4600930a3ebad8a2ee82b6ca2c89d4 (patch)
tree91cb8fb7b62fe8d85b648376e539c32cee49c629 /text-util.h
parent8a1fcdfd93c162af9aa3446849d2c4320c44c7a5 (diff)
downloadvis-4f0c14bd3f4600930a3ebad8a2ee82b6ca2c89d4.tar.gz
vis-4f0c14bd3f4600930a3ebad8a2ee82b6ca2c89d4.tar.xz
text-util: add text_range_intersect utility function
Diffstat (limited to 'text-util.h')
-rw-r--r--text-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/text-util.h b/text-util.h
index 86d3307..709e255 100644
--- a/text-util.h
+++ b/text-util.h
@@ -13,6 +13,8 @@ size_t text_range_size(const Filerange*);
Filerange text_range_empty(void);
/* merge two ranges into a new one which contains both of them */
Filerange text_range_union(const Filerange*, const Filerange*);
+/* get intersection of two ranges */
+Filerange text_range_intersect(const Filerange*, const Filerange*);
/* create new range [min(a,b), max(a,b)] */
Filerange text_range_new(size_t a, size_t b);
/* test whether two ranges are equal */