1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /** @file
3 * TODO: insert short description here
4 *//*
5 * Authors: see git history
6 *
7 * Copyright (C) 2014 Authors
8 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
9 */
10 #ifndef INKSCAPE_STREQ_H
11 #define INKSCAPE_STREQ_H
12
13 #include <cstring>
14
15 /** Convenience/readability wrapper for strcmp(a,b)==0. */
16 inline bool
streq(char const * a,char const * b)17 streq(char const *a, char const *b)
18 {
19 return std::strcmp(a, b) == 0;
20 }
21
22 struct streq_rel {
operatorstreq_rel23 bool operator()(char const *a, char const *b) const
24 {
25 return (std::strcmp(a, b) == 0);
26 }
27 };
28
29 #endif /* !INKSCAPE_STREQ_H */
30
31 /*
32 Local Variables:
33 mode:c++
34 c-file-style:"stroustrup"
35 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
36 indent-tabs-mode:nil
37 fill-column:99
38 End:
39 */
40 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
41