On 3/18/21 4:46 AM, Martin Liška wrote:
Hey.
Recently, I noticed a cumbersome construct we use for string startswith
function
(most notably in a situation when the prefix is a string literal).
Commonly used patterns are:
1) strncmp (arg, "--sysroot=", 10) == 0
2) strncmp (name, "not found", s
Hey.
Recently, I noticed a cumbersome construct we use for string startswith function
(most notably in a situation when the prefix is a string literal).
Commonly used patterns are:
1) strncmp (arg, "--sysroot=", 10) == 0
2) strncmp (name, "not found", sizeof ("not found") - 1) == 0
3) strncmp (v