Go to the documentation of this file.
31 assert(str_clone !=
NULL);
39 return (
char*) calloc(length + 1,
sizeof (
char));
45 char* str_clone =
NULL;
58 *sub_str[length] =
'\0';
64 char* str_sub_string =
NULL;
68 str_sub_string[length] =
'\0';
70 return str_sub_string;
93 assert(name1 !=
NULL);
94 assert(name2 !=
NULL);
96 return stricmp(name1, name2) == 0;
137 token_len =
i - *
pos;
140 token[token_len] =
'\0';
145 if (strlen(
str) > 0) {
150 }
else if (old_pos > 0) {
151 token_len =
i - old_pos;
154 token[token_len] =
'\0';
194 && (strchr(exceptions,
str[
i - 1]) ==
NULL))) {
195 token_len =
i - *
pos;
198 token[token_len] =
'\0';
203 if (strlen(
str) > 0) {
208 }
else if (old_pos > 0) {
209 token_len =
i - old_pos;
212 token[token_len] =
'\0';
224 char white[] = {
" "};
226 for (
i = 0;
i < (
int)strlen(
str);
i ++) {
227 if (strchr(white,
str[
i]) ==
NULL)
return i;
229 return (
int)strlen(
str);
235 char white[] = {
" "};
237 if ((
int)strlen(
str) == 0)
240 for (
i = (
int)strlen(
str) - 1;
i >= 0;
i --) {
241 if (strchr(white,
str[
i]) ==
NULL)
return i;
258 for (
i = 0;
str[
i] !=
'\0';
i++) {
271 for (
i = n - 1;
i >= 0;
i--) {
278 assert(i1 > -1 && i2 > -1);
282 for (
i = i1;
i <= i2;
i++) {
288 str[i2 - i1 + 1] =
'\0';
306 for (
i = n - 1;
i >= 0;
i--) {
307 if (33 <=
str[
i] &&
str[
i] <= 126) {
325 char ciffer[] = {
"0123456789+- "};
327 for (
i = 0;
i < (
int)strlen(
str);
i ++) {
328 if (strchr(ciffer,
str[
i]) ==
NULL)
return 0;
337 char ciffer[] = {
"0123456789 "};
339 for (
i = 0;
i < (
int)strlen(
str);
i ++) {
340 if (strchr(ciffer,
str[
i]) ==
NULL)
return -1;
350 char ciffer[] = {
"0123456789+- .eE"};
352 for (
i = 0;
i < (
int)strlen(
str);
i ++) {
353 if (strchr(ciffer,
str[
i]) ==
NULL)
return 0;
365 if (
result == 1)
return 1;
383 while (*s1 !=
'\0' && *s2 !=
'\0') {
384 d = tolower(*s1) - tolower(*s2);
391 d = tolower(*s1) - tolower(*s2);
char * epr_strip_string_r(char *str)
char * epr_trim_string(char *str)
int epr_get_positive_int(const char *str)
int epr_find_first_not_white(const char *str)
void epr_cut_string(char **sub_str, const char *str, int start, int length)
char * epr_sub_string(const char *str, int start, int length)
char * epr_assign_string(char **str_clone, const char *str)
char * epr_create_string(unsigned int length)
epr_boolean epr_equal_names(const char *name1, const char *name2)
int epr_numeral_suspicion(const char *str)
int epr_find_last_not_white(const char *str)
char * epr_clone_string(const char *str)
#define EPR_IRRELEVANCE_SYMBOL
char * epr_str_tok_tok(const char *str, const char *seps, const char *exceptions, epr_uint *pos)
char * epr_str_tok(const char *str, const char *seps, int *pos)
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second and prod_ix set to PARAM_TYPE_INT name_prefix is compared with the beginning of the product name If name_suffix is not empty the it must match the end of the product name The characters right after the prefix are read as an integer and prod_ix is set to that number strncpy(l2prod->name_prefix, "myprod", UNITLEN)
int stricmp(const char *s1, const char *s2)
void epr_free_and_null_string(char **str)
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
void epr_free_string(char *str)
int epr_if_no_letters(const char *str)
int epr_if_no_scaling(const char *str)