I've said it before: there should only be one str* function in the standard lib: `strnlen`, and it should only be used to implement safer \
-
-
Replying to @stephentyrone
@stephentyrone Don't you mean memchr? It can be used to implement strnlen but also "strnchr", etc.2 replies 0 retweets 0 likes -
Replying to @RichFelker
@stephentyrone And don't forget strstr which has no easy substitute, although of course strnstr would be preferable.1 reply 0 retweets 0 likes -
Replying to @RichFelker
@RichFelker `strstr` is horrific. If strings are short, you're better off using stupid algorithm. If long, you want the length anyway.2 replies 0 retweets 1 like -
Replying to @stephentyrone
@stephentyrone There's no standard function like strstr to work with known-size strings.2 replies 0 retweets 0 likes -
Replying to @RichFelker
@RichFelker Standard should include `memmem( )`.3 replies 0 retweets 0 likes
Replying to @stephentyrone
@stephentyrone Agreed, but as I mentioned memmem does not suffice to replace strstr.
10:04 AM - 22 Dec 2015
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.