Hacker GitHub

← All repos

antirez/sds

View on GitHub ↗ ★ 5,588 C

Simple Dynamic Strings library for C

67 mentions on Hacker News by 50 people: 7 stories, 60 comments · first 2014-02-06 · latest 2026-10-15

Mentions per year 67 mentions · busiest year 2021 (13)
20082026
  1. Why don't people just use redis' sds ( https://github.com/antirez/sds ) string library instead of using str* functions? It's much safer and much higher level.
    comment by aviggiano · 2017-04-29 · in strncpy() is not a safer strcpy() (2012)
  2. I'd argue sds meets that challenge, though not in the way you probably mean: https://github.com/antirez/sds/blob/master/README.md
  3. Check out https://github.com/antirez/sds
  4. The SDS library ( http://github.com/antirez/sds ) is the middle ground between the two approaches. SDS strings are apparently C null-terminated strings, but before the pointer that you pass around there is metadata with the length. This…
    comment by antirez · 2016-01-05 · in A defense of C's null-terminated strings
  5. You might look at the one from Redis: https://github.com/antirez/sds
    comment by rch · 2015-08-27 · in Go enjoy Python3
  6. We got that solved. https://github.com/antirez/sds
  7. …very talented. Not only because of Redis, which is great, but for other great tools too, e.g. sds: https://github.com/antirez/sds
  8. …It doesn't do reference counting, but is helpful for many other string manipulation issues. [0] https://github.com/antirez/sds
    comment by michaelmior · 2014-09-24 · in Adding strlcpy() to glibc
  9. I think you meant "va_end(ap);". Created a pull request for you: https://github.com/antirez/sds/pull/8
    comment by fmela · 2014-02-06 · in Simple Dynamic Strings library for C
  10. Thanks unwind, this is much better indeed! Fixing. EDIT: Fixed here: https://github.com/antirez/sds/commit/c636fc6cd25e455a75dca2... Seems everything is still working but I need definitely more unit tests... Note everything is covered…
    comment by antirez · 2014-02-06 · in Simple Dynamic Strings library for C