mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 08:13:14 +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:
@@ -227,6 +227,8 @@ TEST(Eval, EvalExpression)
|
||||
WEE_CHECK_EVAL("te+", "${cut:2,+,test}");
|
||||
WEE_CHECK_EVAL("éà", "${cut:2,,éàô}");
|
||||
WEE_CHECK_EVAL("éà+", "${cut:2,+,éàô}");
|
||||
WEE_CHECK_EVAL("こん+", "${cut:2,+,こんにちは世界}");
|
||||
WEE_CHECK_EVAL("こ+", "${cutscr:2,+,こんにちは世界}");
|
||||
|
||||
/* test color */
|
||||
WEE_CHECK_EVAL(gui_color_get_custom ("green"), "${color:green}");
|
||||
|
||||
Reference in New Issue
Block a user