100 Commits
Author SHA1 Message Date
Patrick Pelissier 9e5d14ce36 Factorization & add tests 2020-05-21 13:10:50 +02:00
Patrick Pelissier 3bafede8b7 * Make the test more pertinent 2020-05-21 12:32:33 +02:00
Patrick Pelissier 933b495ed1 * Optimization for M_LET for a string_t in case of constant non formatted string
* Support for string_t in M_LET for string_t in C11 mode.
* Adding associate test
2020-05-21 12:19:17 +02:00
Patrick Pelissier 4f7b0b9455 Happy new year 2020 2020-01-04 15:41:06 +01:00
Tobias Boege 3ea063d1e0 Fix string_clear_get_str when stack allocated
If a string_t is stack-allocated, string_clear_get_str would still try
to copy it from the NULL heap pointer, resulting in a failed assertion.
Copy from the stack instead. Also add a test for this.
2019-09-26 05:39:49 +02:00
Patrick Pelissier 481009d18b Add function _end_with for strings. 2019-05-07 16:12:43 +02:00
Patrick Pelissier c89d6ef0ce Fix test. 2019-04-20 12:33:08 +02:00
Patrick Pelissier 866721d067 Add first prototype of string with stack allocation. 2019-04-20 12:33:08 +02:00
Patrick Pelissier 31ca762c62 Add a new test case for empty string. 2019-02-17 09:49:49 +01:00
Patrick Pelissier 0507d94306 Add test for IO for BOUNDED STRING 2019-01-26 13:39:47 +01:00
Patrick Pelissier 4685aac454 Add test for hash of empty string 2019-01-26 09:10:36 +01:00
Patrick Pelissier 8b3a4a802c Happy new year! 2019-01-02 18:12:07 +01:00
Patrick Pelissier 79d0452427 Instead of fixed string, enable using printf like formatting for initialization of a string. 2018-09-02 11:05:27 +02:00
Patrick Pelissier ad5c141a7c Enable support to initialize a string_t with a const char[] within M_LET. 2018-09-02 11:00:14 +02:00
Patrick Pelissier 34d56c54c8 Test strim with an empty string.
(Shall do nothing).
2018-08-03 20:22:32 +02:00
Patrick Pelissier be26176828 Add one more test case. 2018-07-18 21:41:14 +02:00
Patrick Pelissier 817724ce39 Fix issue for get_word:
the separators need to be skipped first.
2018-06-29 19:40:35 +02:00
Patrick Pelissier 2ad8ae3451 Rewrite parse_str interface to be more like strol 2018-05-03 12:59:10 +02:00
Patrick Pelissier 47a49263ae Add function _parse_str for string. 2018-05-02 19:36:51 +02:00
Patrick Pelissier a12e3534c6 Rewrite I/O functions so that they handle properly
non printable characters.
2018-04-21 10:26:05 +02:00
Patrick Pelissier da07a5b613 string_strim allows optionnal second argument which list the characters to strim. 2018-04-20 20:46:44 +02:00
Patrick Pelissier 20989a7ab5 Add test for bounded string. 2018-03-24 08:42:47 +01:00
Patrick Pelissier c97a68029b Improve coverage 2018-02-05 22:18:56 +01:00
Patrick Pelissier 210e05f7fc Update copyright to 2018 2018-01-29 20:28:30 +01:00
Patrick Pelissier 57ec4514d4 Fix bug detected by scan-build 2017-12-30 10:30:49 +01:00
Patrick Pelissier eae0a3833a Add separation 2017-12-13 21:57:24 +01:00
Patrick Pelissier 3296c5313c Add more tests. 2017-12-13 21:56:41 +01:00
Patrick Pelissier cc30ecebfc Fix tests. 2017-12-13 21:51:16 +01:00
Patrick Pelissier c4447123f3 Add more tests 2017-12-09 18:11:49 +01:00
Patrick Pelissier 873e1710c9 Add tests 2017-12-09 16:54:11 +01:00
Patrick Pelissier a07d71274a Fix issue with massive parallele check 2017-10-25 21:46:54 +02:00
Patrick Pelissier 4c688c1004 Register global oplist for string_t. 2017-09-14 22:56:35 +02:00
Patrick Pelissier 84e7f4ccaf Fix #11
Rename string_pbrk into string_search_pbrk for consistency
2017-08-15 09:23:21 +02:00
Patrick Pelissier 866e1e0b7a Add new function string_set_n to extract a sub-string from a string. 2017-08-14 23:30:20 +02:00
Patrick Pelissier 010f397349 Rename string_get_length into string_size
<== Uniformisation with the other containers.
2017-08-09 23:44:27 +02:00
Patrick Pelissier f0c03853f8 Do not activate strlen assume for debug mode.
This will make debug mode faster.

It also fixes a problem with GCC7 which makes
**release**mode slower (since it called strlen!)
2017-08-06 18:29:09 +02:00
Patrick Pelissier a780a7d144 Add string_pbrk 2017-08-02 22:24:12 +02:00
Patrick Pelissier 7165740af3 Add function string_replace_at
(Compatible with C++ interface)
2017-08-02 22:02:49 +02:00
Patrick Pelissier cb99eb4ce9 Add new test 2017-07-11 09:27:52 +02:00
Patrick Pelissier e0aa57b845 Replace string_shrink2fit by string_reserve (More generic). 2017-07-11 09:21:03 +02:00
Patrick Pelissier 25abbbc98a Improve coverage. 2017-07-10 16:18:14 +02:00
Patrick Pelissier c19c88deb8 Add test for string_get_word 2017-07-10 12:59:23 +02:00
Patrick Pelissier 2f569d7201 Add more tests. 2017-05-02 14:52:06 +02:00
Patrick Pelissier d57bae7198 Fix bug. 2017-04-29 22:33:25 +02:00
Patrick Pelissier e2e9f2db43 Remove gnu code from test. 2017-04-29 22:28:51 +02:00
Patrick Pelissier f1b38432aa More tests. 2017-04-23 10:13:38 +02:00
Patrick Pelissier 8ab3b8f067 Add a new case. 2017-03-27 13:52:02 +02:00
Patrick Pelissier 29d3439900 Add SWAP for string 2017-03-14 21:31:47 +01:00
Patrick Pelissier 41aa717782 Proper use of exit to terminate a test. 2017-03-12 18:56:03 +01:00
Patrick Pelissier 8e9d20ba1a Add initial stuff 2017-02-18 18:51:04 +01:00