logoalt Hacker News

whytevuhuniyesterday at 8:11 PM1 replyview on HN

How does strv2cstr work? I assume it doesn't allocate, so not sure how it can add a null terminator.


Replies

ueckeryesterday at 8:16 PM

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

show 1 reply