Commit Graph

178 Commits (1ef7a55e727f6936ee8aee702d8e2daa4c767d52)

Author SHA1 Message Date
Sébastien Helleu 1ef7a55e72 core: fix typo: Weechat -> WeeChat 2019-03-17 18:34:21 +01:00
Sébastien Helleu 2b70d71aa1 core: replace argument "keep_eol" by "flags" in function string_split (closes #1322) 2019-03-10 18:29:16 +01:00
Sébastien Helleu 8aa5f5375e core: add value -1 for keep_eol in function string_strip (issue #1322)
The value -1 means it's a standard split, but empty items are kept, and
separators are not removed at beginning/end of string.
2019-03-09 21:56:05 +01:00
Sébastien Helleu c2859096cb api: add function string_match_list 2019-02-27 07:46:22 +01:00
Sébastien Helleu 4d9fd4c4aa core: fix compilation of empty regular expression (not allowed on FreeBSD) 2019-01-26 10:21:39 +01:00
Sébastien Helleu 2b0057239b core: update copyright dates 2019-01-01 15:40:51 +01:00
Sébastien Helleu 342261d35b core: use https for all links where secured http is supported 2018-11-29 23:18:55 +01:00
Sébastien Helleu 4712d0bb06 core: use https for links to GNU GPL license 2018-11-29 23:16:07 +01:00
Sébastien Helleu ed3f281ba9 api: add functions string_base_{encode,decode}, remove functions string_{encode,decode}_base64 2018-11-04 14:49:11 +01:00
Sébastien Helleu 6d72868e15 api: return integer in function string_encode_base16 2018-11-02 14:20:16 +01:00
Sébastien Helleu 8848b0e22a api: return integer in function string_encode_base64 2018-11-02 14:09:23 +01:00
Sébastien Helleu d0ea801724 core: add support of TOTP generation/validation (Time-based One-Time Password) 2018-11-02 14:06:14 +01:00
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 6d061a9ac0 api: fix memory leak in function string_split 2018-08-15 09:42:43 +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 39a291bc53 core: return NULL in function string_cut if string is NULL 2018-06-02 15:14:21 +02:00
Sébastien Helleu 7ee88fb46c core: fix some styles 2018-01-07 09:11:45 +01:00
Sébastien Helleu ed4837b2f6 core: update copyright dates 2018-01-05 00:54:18 +01:00
Sébastien Helleu b072586d79 core: add missing includes of stdio.h 2017-11-04 21:03:15 +01:00
Sébastien Helleu 3dc72b2e5f core: free use of pointer after free in case of error in function string_dyn_concat 2017-06-10 17:35:47 +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 94355e2e38 core: ensure length is not negative in function string_strndup 2017-04-22 15:15:54 +02:00
Sébastien Helleu c652598ad7 api: fix memory leak in function string_dyn_free()
Bug was introduced by commit af138840b3.
2017-04-02 08:39:29 +02:00
Sébastien Helleu af138840b3 api: return pointer to string in function string_dyn_free() if argument "free_string" is 0 2017-04-01 12:04:28 +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 07d16903f3 api: add dynamic string functions (string_dyn_*)
New functions:
- string_dyn_alloc
- string_dyn_copy
- string_dyn_concat
- string_dyn_free
2017-03-25 14:18:19 +01:00
Sébastien Helleu 0d059add9a core: check that pointers received in arguments are not NULL in "free" functions
Functions:
- hdata_free
- infolist_var_free
- infolist_item_free
- infolist_free
- string_shared_free
- gui_window_objects_free
- gui_color_free
- gui_completion_free
- gui_filter_free
- gui_history_buffer_free
- gui_hotlist_free
- gui_key_free
- gui_lines_free
- gui_line_tags_free
- gui_line_free
- gui_window_tree_free
- gui_window_scroll_free
2017-03-25 14:01:50 +01:00
Sébastien Helleu 705d86e684 core: update copyright dates 2017-01-01 11:32:04 +01:00
Simmo Saan bb22f2486b api: fix string_expand_home SIGSEGV when HOME environment variable unset 2016-10-20 23:24:50 +03:00
Sébastien Helleu 54841f6294 api: fix return of function string_match() when there are multiple masks in the string (issue #812)
Some tests are added as well to test the multiple masks in the string.
2016-10-02 08:58:19 +02:00
Sébastien Helleu eb86def400 core: rename function string_iconv_fprintf to string_fprintf 2016-07-09 18:28:03 +02:00
Wojciech Kwolek a44bcaf080 core: fix the hardcoded separator in string_split_command 2016-05-08 12:14:17 +02:00
Sébastien Helleu 78db8293f6 core: fix typo in a comment 2016-02-18 18:25:56 +01:00
Sébastien Helleu 78aea5df6c core: fix typo in a comment 2016-01-31 08:35:44 +01:00
Sébastien Helleu cd23a5fa92 doc: add an example in function string_split (plugin API reference) 2016-01-24 08:03:55 +01:00
Sébastien Helleu d6af8c312f core: fix number of arguments returned by string_split
When keep_eol is 2 and separators are found at the end of string,
the function returned argc + 1 instead of argc.
2016-01-23 10:32:56 +01:00
Sébastien Helleu 3330724574 core: update copyright dates 2016-01-01 11:09:53 +01:00
Sébastien Helleu 57b6e320d3 core: fix execution of empty command name
The strings "/" and "/ " are not considered as valid commands any more.
2015-12-31 19:07:14 +01:00
Sébastien Helleu 41cb1bf635 api: fix handle of invalid escape in function string_convert_escaped_chars()
And a new test is now checking that "\" returns "".
2015-08-24 11:05:31 +02:00
Sébastien Helleu 951d1f91a4 api: add function string_hex_dump() 2015-08-22 09:30:08 +02:00
Sébastien Helleu 46a9d17ac3 api: add argument "length" in function utf8_is_valid() 2015-08-18 07:36:48 +02:00
Sébastien Helleu 4ecd8a505f api: fix type of value returned by functions utf8_prev_char, utf8_next_char and utf8_add_offset 2015-07-04 08:39:55 +02:00
Sébastien Helleu bd850398e8 core: add missing comments before functions when the result must be freed after use 2015-07-04 08:24:53 +02:00
Sébastien Helleu b13db0305d api: fix type of value returned by function strcasestr 2015-07-03 19:45:51 +02:00
Sébastien Helleu 2bd2d74a07 api: add function string_eval_path_home() 2015-06-24 07:54:42 +02:00
Sébastien Helleu 71dd64678c core: add comments after some #endif 2015-04-30 21:15:30 +02:00