logoalt Hacker News

ueckeryesterday at 8:16 PM1 replyview on HN

It will not add one if there isn't one already. (I should probably rename this function, work in progress..). But the type is an array of the correct length.

Edit: renamed to strv2array


Replies

whytevuhuniyesterday at 8:31 PM

Ah, okay. In that case I feel like the only sane way to approach this is to completely abolish null-terminated strings, and reimplement everything (including stuff like printf's format and arguments) in terms of strv. Otherwise if there has to be a 2cstr function, it should be an allocating one.

show 1 reply