#include <lightmediascanner_utils.h>
#include <ctype.h>
#include <stdlib.h>
#include <alloca.h>
Go to the source code of this file.
Functions | |
void | lms_strstrip (char *str, unsigned int *p_len) |
void | lms_strstrip_and_free (char **p_str, unsigned int *p_len) |
void | lms_string_size_strip_and_free (struct lms_string_size *p) |
int | lms_which_extension (const char *name, unsigned int name_len, const struct lms_string_size *exts, unsigned int exts_len) |
void lms_string_size_strip_and_free | ( | struct lms_string_size * | p | ) |
lms_string_size version of lms_strstrip_and_free().
*p | pointer to lms_string_size to be stripped. |
Definition at line 114 of file lightmediascanner_utils.c.
References lms_string_size::len, lms_strstrip(), and lms_string_size::str.
void lms_strstrip | ( | char * | str, | |
unsigned int * | p_len | |||
) |
Copyright (C) 2007 by INdT
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program 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 Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
str | string to be stripped. | |
p_len | string length to analyse, also the place where the final size is stored. |
Definition at line 34 of file lightmediascanner_utils.c.
Referenced by lms_string_size_strip_and_free(), and lms_strstrip_and_free().
void lms_strstrip_and_free | ( | char ** | p_str, | |
unsigned int * | p_len | |||
) |
If string exists, strips it, in place, free if *p_len = 0
p_str | pointer to string to be stripped. | |
p_len | string length to analyse, also the place where the final size is stored. |
Definition at line 94 of file lightmediascanner_utils.c.
References lms_strstrip().
int lms_which_extension | ( | const char * | name, | |
unsigned int | name_len, | |||
const struct lms_string_size * | exts, | |||
unsigned int | exts_len | |||
) |
Find out which of the given extensions matches the given name.
name | string to analyse. | |
name_len | string length. | |
exts | array of extensions to be checked. | |
exts_len | number of items in array exts |
exts
or -1 if it doesn't match none. Definition at line 138 of file lightmediascanner_utils.c.
References lms_string_size::str.