Patrick Pelissier
1d163a396e
Replace assert by M_ASSERT
2023-04-03 00:12:00 +02:00
Patrick Pelissier
7534aa0d61
Add internal M_UNLIKELY_NOMEM to help coverage computation
2023-04-03 00:05:29 +02:00
Patrick Pelissier
fbab093d52
Avoid warnings about variables never read.
2023-02-24 19:56:26 +01:00
Patrick Pelissier
925c06beb8
Fix usage of va_copy
2023-02-24 15:07:29 +01:00
Patrick Pelissier
482ec38e62
Fix wrong use of isprint function.
2023-02-11 14:34:13 +01:00
Patrick Pelissier
a2ae209992
Happy new year
2023-01-02 12:57:41 +01:00
Patrick Pelissier
f5bbc0a7fb
Implement multiple kind of workarounds for GCC 12
...
as it produces more false warnings
Include missing header in C++ mode
2022-12-22 20:42:20 +01:00
Patrick Pelissier
fb53a464d7
Update comments
2022-10-01 20:41:45 +02:00
Patrick Pelissier
95bc7063a0
Remove some warning with clang:
...
it complains about using a GNU extension
in GNU mode (gnu11)!
2022-10-01 11:36:14 +02:00
Patrick Pelissier
3aa3e95e4c
Remove constraint of calling string_end_p
...
before string_next or string_get_cref
This generates slighty more code but it is much saner
from user point of view.
2022-09-13 00:18:15 +02:00
Patrick Pelissier
d7b45cc220
Fix issue in string_previous
2022-09-11 23:14:52 +02:00
Patrick Pelissier
cbb2b452bb
Add string_previous function
...
to iterate on the previous UTF8 code point.
2022-09-10 16:30:45 +02:00
Patrick Pelissier
18f04da4ec
Robustness/fix:
...
string_next won't advance if the end of string is reached.
2022-09-10 16:19:58 +02:00
Patrick Pelissier
41c4f5fe5c
Add string functions :
...
* string_it_get_pos to return the position in the steam
* string_it_pos to start iterating from a given position.
2022-09-10 16:16:13 +02:00
Patrick Pelissier
2ab410bd6a
Update comments to reflect that we work
...
on UTF8 code points and not Unicode characters.
2022-09-10 10:39:04 +02:00
Patrick Pelissier
aefbc5b2f5
Factorize the test of the start of an UTF8 code point
...
in a separate function
2022-09-10 10:34:54 +02:00
Patrick Pelissier
442b0e7cea
Reduce size of struct string_it_t on 64 bits
...
by storing an offset to the next character
instead of a pointer. An offset can be stored as a
BYTE instead of a PTR since UT-8 can use at most
4 characters per code point.
2022-09-10 09:59:06 +02:00
Patrick Pelissier
abffe201e5
Change the suffix of the functions dealing with C-String to _cstr
...
instead of _str.
See #99 for details.
2022-07-30 12:00:55 +02:00
Patrick Pelissier
502756c731
Simplify the control flow to count for utf8 encoded characters
2022-06-16 23:58:23 +02:00
Patrick Pelissier
c12d0a3f23
Update comments
2022-06-03 21:43:15 +02:00
Patrick Pelissier
e93df4332a
Fix issue for 16 bits architecture
2022-05-14 09:16:41 +02:00
Patrick Pelissier
2fb912d43d
Should remove warning with Visual C++
2022-04-23 10:34:54 +02:00
Patrick Pelissier
6d98c273c1
Add EMPLACE_TYPE from const char *
2022-04-21 23:11:11 +02:00
Patrick Pelissier
daac0169d5
Reformat
2022-04-14 23:47:11 +02:00
Patrick Pelissier
4abf0ad2b2
Simplify code
2022-04-11 22:34:08 +02:00
Patrick Pelissier
50fd27e07b
Use of M_DEFAULT_ARGS instead of M_IF_DEFAULT1
2022-04-10 23:09:29 +02:00
Patrick Pelissier
530cc8d2a2
Update comments
2022-03-31 22:16:10 +02:00
Patrick Pelissier
a19e1acfff
Add function m_string_set_si & m_string_set_ui for converting an integer into a string.
2022-03-26 16:08:28 +01:00
Patrick Pelissier
a4d9b8df17
Moving internal types to internal namespace
2022-03-22 23:37:35 +01:00
Patrick Pelissier
9a1b4abcf9
Add missing small names
2022-03-15 19:29:18 +01:00
Patrick Pelissier
a0fc57687b
Fix format
2022-03-15 19:24:53 +01:00
Patrick Pelissier
02897f982f
Add m_ prefix for the string API
2022-03-15 19:24:14 +01:00
Patrick Pelissier
d7909f7312
Move internal function / macros with the m_string prefix to the internal m_str1ng prefix
2022-03-14 19:29:33 +01:00
Patrick Pelissier
8dd440a582
Add note about the string_t format
2022-03-13 22:48:08 +01:00
Patrick Pelissier
19b01b404d
Migrate to 2022
2022-03-12 20:25:45 +01:00
Tim Gates
7b6bfac7cb
docs: Fix a few typos
...
There are small typos in:
- example/ex-algo03.c
- m-algo.h
- m-core.h
- m-dict.h
- m-string.h
Fixes:
- Should read `occurrence` rather than `occurence`.
- Should read `fulfilled` rather than `fullfilled`.
- Should read `dictionaries` rather than `dictionnaries`.
- Should read `environment` rather than `environement`.
- Should read `unordered` rather than `undordered`.
2021-12-23 10:00:44 +11:00
Patrick Pelissier
1a1339da6b
Remove deprecated features
2021-11-20 13:05:50 +01:00
Patrick Pelissier
6b064870f5
Rename CLEAN operator in RESET operator
2021-10-30 23:26:27 +02:00
Patrick Pelissier
9176953a8e
Rename string_clean in string_reset to avoid confusing _clean & _clear functions. See #97
2021-10-28 17:27:41 +02:00
Patrick Pelissier
ae6b87d646
Optimization in case of small constant strings
2021-10-24 21:48:02 +02:00
Patrick Pelissier
61f8dcdbae
Add string_set_char function
2021-09-22 23:07:35 +02:00
Patrick Pelissier
8ce59c2e9d
Maintenance:
...
* update comments
* simplify code.
2021-08-07 00:34:18 +02:00
Patrick Pelissier
e46bbaffb9
Avoid GCC warning (-Wstringop-truncation)
2021-07-05 23:14:21 +02:00
Patrick Pelissier
408959c927
Be more precise in the bound check.
2021-07-05 22:32:19 +02:00
Patrick Pelissier
a5b6d8e391
Rewrite assertion to be more robust.
2021-07-04 00:20:10 +02:00
Patrick Pelissier
3ac08b0395
Add test with a lot of different kind of M_LET with list of strings.
2021-07-01 22:12:15 +02:00
Patrick Pelissier
154b503bc6
Avoid using the input more than once in macros string_init_* (Avoid issues)
2021-07-01 22:12:15 +02:00
Patrick Pelissier
0535ceeaeb
Add support of string_t by M_PRINT macro.
2021-06-19 22:46:41 +02:00
Patrick Pelissier
5d4fa31083
Update doc & comments
2021-03-28 11:48:58 +02:00
Patrick Pelissier
07db846f3b
Rename internal string functions to be compliant with new scheme. Not sure if this scheme will remain however (still searching for a better naming that fits all criteria).
2021-03-01 22:18:32 +01:00