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
Patrick Pelissier
ee22399bab
Add new assertion.
2017-07-09 19:28:57 +02:00
Patrick Pelissier
ac79b462fb
Add missing contracts.
2017-07-06 11:48:52 +02:00
Patrick Pelissier
9e5e0a8a51
Add string_fget_word function.
2017-07-06 11:48:02 +02:00
Patrick Pelissier
ffe164c09e
Comment
2017-07-06 11:00:07 +02:00
Patrick Pelissier
987d50eba6
Improve prototype of fgets so that it handles better EOL.
...
Return true in case of something has been read.
2017-07-06 10:57:34 +02:00
Patrick Pelissier
5fae797e41
Do not increase size in _fgets if we reach the EOF.
2017-07-05 23:31:33 +02:00
Patrick Pelissier
38413f2452
Fix #10
2017-07-04 23:36:18 +02:00
Patrick Pelissier
78de4bcfe3
Replace cast by assign cast.
2017-05-28 20:56:50 +02:00
Patrick Pelissier
2d34932563
Replace a classic cast by an assign cast.
2017-05-28 20:55:31 +02:00
Patrick Pelissier
63eed93a43
Add missing assertions
...
Add comments.
2017-05-28 20:50:55 +02:00
Patrick Pelissier
ddf0203ad5
Add 'join' method for string
2017-05-03 22:51:22 +02:00
Patrick Pelissier
f715cac6cf
Fix bug reported by valgrind:
...
if s1==s2, memcpy call is illegal
(but unlikely to fail).
2017-05-02 14:52:42 +02:00
Patrick Pelissier
0f6b99c03a
Update comments.
2017-05-01 09:08:39 +02:00
Patrick Pelissier
d57bae7198
Fix bug.
2017-04-29 22:33:25 +02:00
Patrick Pelissier
58a4135d31
Minor update.
2017-04-29 22:27:38 +02:00
Patrick Pelissier
8d26ff5c00
Add comment
2017-04-08 11:03:38 +02:00
Patrick Pelissier
7b543fb53a
Add note.
2017-04-07 17:52:51 +02:00
Patrick Pelissier
95de9b6321
Properly aligned the char array when using STRING_CTE macro.
2017-03-29 19:06:12 +02:00
Patrick Pelissier
0085b0df8d
Use of m_core_hash for m_string_hash
...
(avoid duplication of code).
2017-03-28 23:57:27 +02:00
Patrick Pelissier
c3e658d09a
Optimize a little bit the functions.
...
Add string_cmpi_str function.
Add assertions.
2017-03-27 13:52:24 +02:00
Patrick Pelissier
3e2ad17eb8
Optmize string_set
2017-03-20 23:54:13 +01:00
Patrick Pelissier
29d3439900
Add SWAP for string
2017-03-14 21:31:47 +01:00
Patrick Pelissier
2e814d03ed
Rename string_search_string into string_search
...
Rename string_strcoll_string into string_strcoll
(more coherent API)
Add for C11 a generic encapsulation allowing to
select either the string or the str function.
2017-03-08 21:22:52 +01:00
Patrick Pelissier
0f0cc0680d
Add note
2017-02-21 21:57:19 +01:00
Patrick Pelissier
a3811b52ee
Factorize the hash system.
...
Insert option to select the hash at dynamic time.
2017-02-21 21:34:40 +01:00
Patrick Pelissier
c786215049
Clean up prototype
2017-02-20 22:51:22 +01:00
Patrick Pelissier
4d019ca1f2
Update library name in headers.
2017-02-20 21:29:21 +01:00
Patrick Pelissier
cb433aa2a8
Rename macros:
...
* CAT* --> M_C*
2017-02-19 00:36:42 +01:00
Patrick Pelissier
8e9d20ba1a
Add initial stuff
2017-02-18 18:51:04 +01:00