summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-04-19 09:08:51 +1000
committerJunio C Hamano <gitster@pobox.com>2013-04-18 16:28:29 -0700
commita7f01c6b4ddf9f2f6bdcb23fc7afb56695807cba (patch)
treebbd2ecfc44a0e3349d2e419f379e653a008dc00f /utf8.h
parenta57523428b4c08795e793356e12afc3de812f84a (diff)
downloadgit-a7f01c6b4ddf9f2f6bdcb23fc7afb56695807cba.tar.gz
pretty: support truncating in %>, %< and %><
%>(N,trunc) truncates the right part after N columns and replace the last two letters with "..". ltrunc does the same on the left. mtrunc cuts the middle out. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/utf8.h b/utf8.h
index a43ef9ae74..edde8ee189 100644
--- a/utf8.h
+++ b/utf8.h
@@ -15,6 +15,8 @@ void strbuf_add_wrapped_text(struct strbuf *buf,
const char *text, int indent, int indent2, int width);
void strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len,
int indent, int indent2, int width);
+void strbuf_utf8_replace(struct strbuf *sb, int pos, int width,
+ const char *subst);
#ifndef NO_ICONV
char *reencode_string_iconv(const char *in, size_t insz,