1/* Utility functions 2 * 3 * Project : minidlna 4 * Website : http://sourceforge.net/projects/minidlna/ 5 * Author : Justin Maggard 6 * Copyright (c) 2008-2009 Justin Maggard 7 * This software is subject to the conditions detailed in the 8 * LICENCE file provided in this distribution. 9 * */ 10#ifndef __UTILS_H__ 11#define __UTILS_H__ 12 13int 14ends_with(const char * haystack, const char * needle); 15 16char * 17trim(char *str); 18 19char * 20strstrc(const char *s, const char *p, const char t); 21 22char * 23modifyString(char * string, const char * before, const char * after, short like); 24 25char * 26escape_tag(const char *tag); 27 28void 29strip_ext(char * name); 30 31int 32make_dir(char * path, mode_t mode); 33 34int 35is_video(const char * file); 36 37int 38is_audio(const char * file); 39 40int 41is_image(const char * file); 42 43int 44is_playlist(const char * file); 45 46int 47resolve_unknown_type(const char * path, enum media_types dir_type); 48 49#endif 50