Simple macro to check the prefix of a string in a case-insensitive way. Signed-off-by: Pino Toscano <ptoscano@xxxxxxxxxx> --- src/internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/internal.h b/src/internal.h index 589503041..1760e3b69 100644 --- a/src/internal.h +++ b/src/internal.h @@ -75,6 +75,7 @@ # define STRNEQLEN(a, b, n) (strncmp(a, b, n) != 0) # define STRCASENEQLEN(a, b, n) (c_strncasecmp(a, b, n) != 0) # define STRPREFIX(a, b) (strncmp(a, b, strlen(b)) == 0) +# define STRCASEPREFIX(a, b) (c_strncasecmp(a, b, strlen(b)) == 0) # define STRSKIP(a, b) (STRPREFIX(a, b) ? (a) + strlen(b) : NULL) # define STREQ_NULLABLE(a, b) \ -- 2.14.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list