Sébastien Helleu
8da3458f4c
core: add repeat of string in evaluation of expressions with "repeat:count,string" ( closes #958 )
2018-10-09 21:12:02 +02:00
Sébastien Helleu
82697714e1
core: fix evaluation of nested ternary operators ( closes #1263 )
2018-10-08 22:51:08 +02:00
Sébastien Helleu
1ff9d1f52a
core: add missing slash at the end of weechat.org URLs
2018-09-09 10:00:53 +02:00
Sébastien Helleu
6bf0dfddd6
core: fix evaluation of condition when the left operand is an empty string
2018-08-18 15:30:16 +02:00
Sébastien Helleu
1a0087a7d7
core: fix string evaluation with regex replacement when the string is empty
2018-08-16 22:45:42 +02:00
Sébastien Helleu
12a6f74ec0
core: fix check of tags in lines
...
All changes:
- fix check of tags in lines: check lines without tags, fix check of tags with
negation ("!tag")
- add string functions string_split_tags and string_free_split_tags
- add tests on function gui_line_match_tags
2018-08-12 20:30:13 +02:00
Sébastien Helleu
1abf4040f1
core: add reverse of string in evaluation of expressions with "rev:" ( closes #1200 )
2018-06-02 16:01:14 +02:00
Sébastien Helleu
ba19fa9963
core: count number of chars instead of bytes for suffix in function string_cut
2018-06-02 15:18:29 +02:00
Sébastien Helleu
ba13d764e6
tests: add tests on eval_expression() with different prefix/suffix
2018-04-17 20:26:45 +02:00
Sébastien Helleu
ed4837b2f6
core: update copyright dates
2018-01-05 00:54:18 +01:00
Sébastien Helleu
1d56e17b2f
core: allow floating point and hexadecimal numbers in comparison of evaluated values
2017-10-17 20:43:40 +02:00
Simmo Saan
1329dfb57a
core: add wildcard matching operators to eval ( closes #608 )
2017-04-29 17:04:44 +02:00
Sébastien Helleu
112bebcddf
core: add a way to count the suffix length in max chars displayed in cut of string ("cut:" and "cutscr:") ( closes #963 )
...
The format to use is one of:
- ${cut:+max,suffix,string}
- ${cutscr:+max,suffix,string}
With the "+" before max, WeeChat ensures there are at most "max" chars in
output, including the length of suffix string.
2017-04-24 22:37:49 +02:00
Sébastien Helleu
bb00b6b8fb
core: add ${re:#} to get the index of last group captured in evaluation of expressions
2017-03-30 22:13:14 +02:00
Sébastien Helleu
eb2d0ac58a
tests: add tests on combining characters in cut/cutscr (evaluation of expression)
2017-03-28 22:09:11 +02:00
Sébastien Helleu
3045021430
core: fix cut of chars in "cutscr" of evaluated strings
...
This fixes two problems:
- stop before max char displayed with wide chars
- preserve combining chars in the output
Before the fix (wrong):
>> ${cutscr:3,+,こんにちは世界}
== [こん+]
>> ${cutscr:1,+,a${\u0308}}
== [a+]
After the fix (OK):
>> ${cutscr:3,+,こんにちは世界}
== [こ+]
>> ${cutscr:1,+,a${\u0308}}
== [ä]
2017-03-28 20:45:31 +02:00
Sébastien Helleu
f99c866f35
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.
2017-03-27 21:14:51 +02:00
Sébastien Helleu
9a8ec36cbd
core: add cut of string in evaluation of expressions
...
The syntax is: ${cut:max,suffix,string}.
The string is cut after max chars. If the string is cut, the optional suffix is
added after.
2017-03-25 14:19:48 +01:00
Sébastien Helleu
83117f8d2a
core: add ternary operator (condition) in evaluation of expressions
2017-03-25 14:18:19 +01:00
Sébastien Helleu
705d86e684
core: update copyright dates
2017-01-01 11:32:04 +01:00
Sébastien Helleu
e218db3582
tests: add test on the "extra" option on function eval_expression()
2016-08-18 22:11:50 +02:00
Sébastien Helleu
3330724574
core: update copyright dates
2016-01-01 11:09:53 +01:00
Sébastien Helleu
9bf40517d3
api: add support of evaluated sub-strings and current date/time in function string_eval_expression() and command /eval
2015-06-30 20:25:35 +02:00
Sébastien Helleu
d322389e04
core: add support of full color option name in command /eval and API function string_eval_expression()
2015-04-26 10:29:30 +02:00
Sébastien Helleu
f6941c20eb
tests: remove unused variable
2015-03-02 21:15:23 +01:00
Sébastien Helleu
a020c28ea6
core: update copyright dates
2015-01-01 09:23:23 +01:00
Sébastien Helleu
0cd2aff765
core: use https for WeeChat URLs
2014-12-13 09:16:09 +01:00
Sébastien Helleu
b460055f78
tests: add tests of regex replace with empty regex or regex_replace
2014-11-23 08:32:52 +01:00
Sébastien Helleu
633a32ccd3
api: add regex replace feature in function string_eval_expression
2014-10-22 21:19:54 +02:00
Sébastien Helleu
f62f759c3d
core: add hide of chars in string in evaluation of expressions
...
The syntax is: ${hide:char,string}.
All chars in string are replaced with char (which can be one or more chars).
2014-10-16 20:46:06 +02:00
Sébastien Helleu
5014231818
tests: add some tests on function eval_expression
2014-10-12 17:58:13 +02:00
Sébastien Helleu
f39b37351c
tests: fix build of tests when the build directory is outside source tree ( closes #178 )
2014-08-25 07:38:38 +02:00
Sébastien Helleu
db9a8e7bc4
tests: add unit tests using CppUTest
...
The tests can be run only via CMake:
1. build with tests: cmake .. -DENABLE_TESTS=ON
2. make
3. ctest (or ctest -V for verbose output)
2014-07-20 12:13:25 +02:00