1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 09:43:13 +02:00

core: add cut of string with max chars displayed in evaluation of expressions

The syntax is: ${cutscr:max,suffix,string}.
The string is cut after max chars displayed on screen. If the string is cut,
the optional suffix is added after.
This commit is contained in:
Sébastien Helleu
2017-03-27 21:14:51 +02:00
parent f37ecbfefd
commit f99c866f35
31 changed files with 262 additions and 127 deletions
+1 -2
View File
@@ -354,8 +354,7 @@ TEST(Utf8, Size)
LONGS_EQUAL(1, utf8_char_size_screen ("A"));
LONGS_EQUAL(1, utf8_char_size_screen ("ë"));
LONGS_EQUAL(1, utf8_char_size_screen (""));
/* this test does not work on Ubuntu Precise: it returns 2 instead of 1 */
/*LONGS_EQUAL(1, utf8_char_size_screen (han_char));*/
LONGS_EQUAL(2, utf8_char_size_screen (han_char));
/* length of string (in chars) */
LONGS_EQUAL(0, utf8_strlen (NULL));