Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
camel-cdr
on Nov 22, 2022
|
parent
|
context
|
favorite
| on:
Considering C99 for Curl
I tend to stay away from the entire C style strings approach in general whenever I write C.
cassepipe
on Nov 22, 2022
|
next
[–]
I
always
use antirez's SDS string Library. The fact that they are compatible C strings with the only price to pay being a call to sdsfree() instead of free I like a lot. Simple and yet super useful. Check it out.
anthk
on Nov 22, 2022
|
prev
[–]
Strlcpy and strlcat from OpenBSD works.
camel-cdr
on Nov 22, 2022
|
parent
|
next
[–]
IMO you should store the size of your strings. If you know the sizes already then you can just memcpy/memmove.
pjmlp
on Nov 22, 2022
|
parent
|
prev
[–]
Only for those that never do mistakes with parameter passing.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: