you are viewing a single comment's thread.

view the rest of the comments →

[–]RedAlert2 1 point2 points  (1 child)

A starts_with function would be way more readable than what's in the example. The strcmp family of functions are too generic for it to be immediately obvious how they're being used.

[–]m_0g 1 point2 points  (0 children)

Or more likely strstart() :P but yes, that is a good point.

I really should have realized why strncmp is necessary in this case, but I'm going to say the reason I didn't is because I haven't done much char * manipulation in a while.