You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To multiplex some function in <string.h>, the end of SDS is '\0'. But the content of SDS may include '\0', in this case, several '\0' would make <string.h> function wrong.
And I check the <string.h> functions in file sds.c, it seems that all the <string.h> functions is using length parameter, so what role did the '\0' at the end of SDS play?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
To multiplex some function in <string.h>, the end of SDS is '\0'. But the content of SDS may include '\0', in this case, several '\0' would make <string.h> function wrong.
And I check the <string.h> functions in file sds.c, it seems that all the <string.h> functions is using length parameter, so what role did the '\0' at the end of SDS play?
Beta Was this translation helpful? Give feedback.
All reactions