On Thu, May 08, 2014 at 05:23:36PM +0400, Pavel Emelyanov wrote: > > > > Don't you rather compare two strings? Why not to use strcmp here? > > Because > > strcmp("foo/bar", "foo") == false > strstartswith("foo/bar", "foo") == true > > :) IOW, you're comparing prefixes. OK.