summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-07-10 08:44:16 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-07-10 08:44:16 -0700
commit91d1a70c1d64c67bbaa5dc94dabf7461ad97bb8d (patch)
tree08f93715512867f64d942fcecaddece9e2d7b141 /lib.h
parent44fc04addc852cd4d0bbfa53a44b69679aaa29c2 (diff)
downloadtxr-91d1a70c1d64c67bbaa5dc94dabf7461ad97bb8d.tar.gz
txr-91d1a70c1d64c67bbaa5dc94dabf7461ad97bb8d.tar.bz2
txr-91d1a70c1d64c67bbaa5dc94dabf7461ad97bb8d.zip
New functions: trim-short-suffix, trim-long-suffix.
* lib.c, lib.h (chk_substrdup): New function. * stream.c, stream.h (trim_short_suffix, trim_long_suffix): New functions. (stream_init): trim-short-suffix and trim-long-suffix intrinsics registered. * tests/018/path.tl: New tests. * txr.1: Documented. * stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index de4f858a..07ff1edf 100644
--- a/lib.h
+++ b/lib.h
@@ -717,6 +717,7 @@ mem_t *chk_manage_vec(mem_t *old, size_t oldfilled, size_t newfilled,
wchar_t *chk_wmalloc(size_t nwchar);
wchar_t *chk_wrealloc(wchar_t *, size_t nwchar);
wchar_t *chk_strdup(const wchar_t *str);
+wchar_t *chk_substrdup(const wchar_t *str, size_t off, size_t len);
char *chk_strdup_utf8(const char *str);
unsigned char *chk_strdup_8bit(const wchar_t *str);
mem_t *chk_copy_obj(mem_t *orig, size_t size);