diff options
Diffstat (limited to 'lib/str.c')
-rw-r--r-- | lib/str.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/str.c b/lib/str.c new file mode 100644 index 0000000..26e5fcf --- /dev/null +++ b/lib/str.c @@ -0,0 +1,37 @@ +/** @file + * @brief hid-dump - string utilities + * + * Copyright (C) 2010 Nikolai Kondrashov + * + * This file is part of hid-dump. + * + * Hid-dump is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Hid-dump is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with hid-dump; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * @author Nikolai Kondrashov <spbnick@gmail.com> + * + * @(#) $Id$ + */ + +#include "hid_dump/str.h" +#include <ctype.h> + +bool +hid_dump_strisblank(const char *str) +{ + for (; *str != '\0'; str++) + if (!isblank(*str)) + return false; + return true; +} |