Re:New Grad vs. Senior Dev
by ericlippert on Saturday March 28, 2020 @08:44PM
(#22715449)
As I noted in the text, the actual problem that we had to solve was complicated by a great many factors not the least of which was the fact that the library had to handle strings from different string encodings.
Yes, we had strstr in 1994; it was in the 1989 ANSI C standard.
On a very small system, strstr will probably just be naively coded, to save space. On a big system, it might use Knuth-Morrison-Pratt or Boyer-Moore. I don't have to care; by using strstr, that decision is taken care of.