From 391720cb430ad74d01dacb1cd53c06d6283aba4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 5 Apr 2017 12:40:43 +0200 Subject: text: introduce text_char_get which converts \r\n to \n --- text.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'text.c') diff --git a/text.c b/text.c index 390be98..b994bc4 100644 --- a/text.c +++ b/text.c @@ -1548,6 +1548,11 @@ bool text_byte_get(Text *txt, size_t pos, char *buf) { return text_bytes_get(txt, pos, 1, buf); } +bool text_char_get(Text *txt, size_t pos, char *buf) { + Iterator it = text_iterator_get(txt, pos); + return text_iterator_char_get(&it, buf); +} + size_t text_bytes_get(Text *txt, size_t pos, size_t len, char *buf) { if (!buf) return 0; -- cgit v1.2.3