Commit Graph
79 Commits
Author SHA1 Message Date
Patrick Pelissier 2af35673bb Update comments about TODO. 2018-05-15 21:02:34 +02:00
Patrick Pelissier 122cf63a3f Preshift the state by 8, to avoid a shift within the decoder.
Rewrite the size_u to avoid a branch.
2018-05-03 22:11:43 +02:00
Patrick Pelissier 64080fadd3 Update comments. 2018-05-03 13:07:52 +02:00
Patrick Pelissier 1009cd6ed4 Export _parse_str function. 2018-05-03 13:05:45 +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 b5f4f2fc4b Finish splitting m_core_clz into m_core_clz32 & m_core_clz64 2018-04-15 00:10:38 +02:00
Patrick Pélissier 8c34f44dae Finish fixing for 32 bits / clz 2018-04-14 23:14:21 +02:00
Patrick Pelissier 80d78e3270 Add bounded string cte macro 2018-04-11 22:42:22 +02:00
Patrick Pelissier 63874694f8 Rewrite the code to avoid some silly warnings on some implementation. 2018-04-08 20:01:04 +02:00
Patrick Pelissier 8e114d6fe4 Add bounded string definition so that you can easily use them for a container. 2018-03-24 08:42:15 +01:00
Patrick Pelissier d05bb49f5d Add more assertions.
Change prototype of fputs to return the error / success status.
2018-03-23 21:25:55 +01:00
Patrick Pelissier 210e05f7fc Update copyright to 2018 2018-01-29 20:28:30 +01:00
Patrick Pelissier 778bc4072b Rename parameter 2018-01-24 22:23:56 +01:00
Patrick Pelissier 4d41774345 Rename STRING_CONTRACT into internal macro STRINGI_CONTRACT 2018-01-23 21:45:45 +01:00
Patrick Pelissier e65abed8a9 Fix issue with C++ 2017-12-30 12:05:25 +01:00
Patrick Pelissier 57ec4514d4 Fix bug detected by scan-build 2017-12-30 10:30:49 +01:00
Patrick Pelissier c08504863c Simplify fgets to avoid using strchr (faster & simpler)
Simplify fgets to avoid using strchr (faster & simpler)
Simplify fgets to avoid using strchr (faster & simpler)
2017-12-23 00:39:11 +01:00
Patrick Pelissier 48828f085b Add comment 2017-12-13 21:43:27 +01:00
Patrick Pelissier df73de9e10 Add comments. 2017-12-13 21:41:42 +01:00
Patrick Pelissier a24464cfed Return size of the encoding (in case of) 2017-12-09 18:11:58 +01:00
Patrick Pelissier ca5263b488 Update comments 2017-12-09 16:57:55 +01:00
Patrick Pelissier 5cbae75ed0 Update 2017-12-09 16:54:04 +01:00
Patrick Pelissier d0ecc03abe Add some more assertions 2017-12-09 16:39:58 +01:00
Patrick Pelissier 417571755e Add assertions 2017-12-09 16:39:28 +01:00
Patrick Pelissier f1ed954dd0 Add functions 2017-12-09 16:38:59 +01:00
Patrick Pelissier 5f98cc1eb6 Factorisation 2017-12-09 16:36:46 +01:00
Patrick Pelissier ccb6fd6fb2 Add new function. 2017-12-09 16:35:27 +01:00
Patrick Pelissier b5a0d3dd0f Reformat 2017-12-09 15:58:46 +01:00
Patrick Pelissier c751686640 Update comments 2017-12-09 15:58:24 +01:00
Patrick Pelissier f3efaf951f Add first functions to handle UTF8 strings. 2017-12-09 15:57:32 +01:00
Patrick Pelissier 2e564088b0 Simplify the inclusion of headers. 2017-09-16 10:14:45 +02:00
Patrick Pelissier ea60cd2ae6 Fix issue of write after allocated buffer. 2017-09-14 23:00:40 +02:00
Patrick Pelissier 4c688c1004 Register global oplist for string_t. 2017-09-14 22:56:35 +02:00
Patrick Pelissier fc7b1516e2 Replace getc by fgetc 2017-09-09 23:43:26 +02:00
Patrick Pelissier d008494215 Move from 32 bits alignement constraint to 64 bits alignement constraint. 2017-08-22 23:30:20 +02:00
Patrick Pelissier 44cdfa0c77 Remove use of feof and ferror as it is not needed as the return of fgetc
is sufficent.
2017-08-19 21:05:55 +02:00
Patrick Pelissier f981bc990d Port to new helper function. 2017-08-16 08:17:27 +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 d3c139e195 Add assertion 2017-08-14 23:33:08 +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 31c6459201 Fix overflow issue. 2017-08-06 23:12:29 +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 3fe97a02a8 Add new function string_capacity
Update string_reserve to free memory if string is null and it has to
reserve 0 or 1 bytes.
2017-07-11 09:28:01 +02:00
Patrick Pelissier e0aa57b845 Replace string_shrink2fit by string_reserve (More generic). 2017-07-11 09:21:03 +02:00