diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-04-19 09:08:51 +1000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-18 16:28:29 -0700 |
commit | a7f01c6b4ddf9f2f6bdcb23fc7afb56695807cba (patch) | |
tree | bbd2ecfc44a0e3349d2e419f379e653a008dc00f /utf8.h | |
parent | a57523428b4c08795e793356e12afc3de812f84a (diff) | |
download | git-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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, |