1 /* 2 * This file is part of MPlayer. 3 * 4 * MPlayer is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * MPlayer is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License along 15 * with MPlayer; if not, write to the Free Software Foundation, Inc., 16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 */ 18 19 #ifndef MPLAYER_GUI_STRING_H 20 #define MPLAYER_GUI_STRING_H 21 22 #include <stddef.h> 23 24 /** 25 * @brief Wraps #cutString(): 26 * Extract a part of a string delimited by a separator character 27 * at most the size of @a out. 28 */ 29 #define cutStr(in, out, sep, num) cutString(in, out, sep, num, sizeof(out)) 30 31 int cutInt(char *in, char sep, int num); 32 void cutString(char *in, char *out, char sep, int num, size_t maxout); 33 char *decomment(char *in); 34 char *dequote(char *in); 35 char *despace(char *in); 36 char *gstrchr(const char *str, int c); 37 int gstrcmp(const char *a, const char *b); 38 char *gstrdup(const char *str); 39 int gstrncmp(const char *a, const char *b, size_t n); 40 const char *ltrim(const char *in); 41 void setddup(char **old, const char *dir, const char *name); 42 void setdup(char **old, const char *str); 43 char *strlower(char *in); 44 char *strswap(char *in, char from, char to); 45 char *strupper(char *in); 46 47 #endif /* MPLAYER_GUI_STRING_H */ 48