OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
epr_string.h File Reference
#include <stdlib.h>
#include <string.h>
#include <assert.h>
Include dependency graph for epr_string.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * epr_assign_string (char **str_clone, const char *str)
 
char * epr_create_string (unsigned int length)
 
char * epr_clone_string (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)
 
epr_boolean epr_equal_names (const char *name1, const char *name2)
 
void epr_free_string (char *str)
 
char * epr_str_tok (const char *str, const char *seps, int *pos)
 
char * epr_str_tok_tok (const char *str, const char *seps, const char *exceptions, epr_uint *pos)
 
int epr_find_first_not_white (const char *str)
 
int epr_find_last_not_white (const char *str)
 
char * epr_trim_string (char *str)
 
char * epr_strip_string_r (char *str)
 
int epr_if_no_letters (const char *str)
 
int epr_numeral_suspicion (const char *str)
 
int epr_get_positive_int (const char *str)
 
void epr_free_and_null_string (char **str)
 
int epr_if_no_scaling (const char *str)
 
int stricmp (const char *s1, const char *s2)
 

Function Documentation

◆ epr_assign_string()

char* epr_assign_string ( char **  str_clone,
const char *  str 
)

Definition at line 29 of file epr_string.c.

◆ epr_clone_string()

char* epr_clone_string ( const char *  str)

Definition at line 43 of file epr_string.c.

◆ epr_create_string()

char* epr_create_string ( unsigned int  length)

Definition at line 37 of file epr_string.c.

◆ epr_cut_string()

void epr_cut_string ( char **  sub_str,
const char *  str,
int  start,
int  length 
)

Definition at line 54 of file epr_string.c.

◆ epr_equal_names()

epr_boolean epr_equal_names ( const char *  name1,
const char *  name2 
)

Compares the two given names and returns TRUE if they are equal ignoring the case of each letter.

This function is used to compare names throughout the ENVISAT product reader API.

Parameters
name1the first name, must not be NULL
name2the second name, must not be NULL
Returns
TRUE if the names are equal, FALSE otherwise

Definition at line 91 of file epr_string.c.

◆ epr_find_first_not_white()

int epr_find_first_not_white ( const char *  str)

Definition at line 221 of file epr_string.c.

◆ epr_find_last_not_white()

int epr_find_last_not_white ( const char *  str)

Definition at line 232 of file epr_string.c.

◆ epr_free_and_null_string()

void epr_free_and_null_string ( char **  str)

Definition at line 370 of file epr_string.c.

◆ epr_free_string()

void epr_free_string ( char *  str)

Definition at line 100 of file epr_string.c.

◆ epr_get_positive_int()

int epr_get_positive_int ( const char *  str)

Definition at line 334 of file epr_string.c.

◆ epr_if_no_letters()

int epr_if_no_letters ( const char *  str)

Definition at line 322 of file epr_string.c.

◆ epr_if_no_scaling()

int epr_if_no_scaling ( const char *  str)

Definition at line 360 of file epr_string.c.

◆ epr_numeral_suspicion()

int epr_numeral_suspicion ( const char *  str)

Definition at line 347 of file epr_string.c.

◆ epr_str_tok()

char* epr_str_tok ( const char *  str,
const char *  seps,
int *  pos 
)

Findes substrings between separators.

Parameters
strthe string to search
sepsthe separator simbols string
posposition with a search begin
Returns
the next substring (or own string) of the found name or (epr_uint)NULL if an error occured.

Definition at line 122 of file epr_string.c.

◆ epr_str_tok_tok()

char* epr_str_tok_tok ( const char *  str,
const char *  seps,
const char *  exceptions,
epr_uint pos 
)

Findes substrings between double separators.

Parameters
strthe string to search
sepsthe separator simbols string
posposition with a search begin
Returns
the next substring (or own string) of the found name or (uint)NULL if an error occured.

Definition at line 177 of file epr_string.c.

◆ epr_strip_string_r()

char* epr_strip_string_r ( char *  str)

Definition at line 294 of file epr_string.c.

◆ epr_sub_string()

char* epr_sub_string ( const char *  str,
int  start,
int  length 
)

Definition at line 62 of file epr_string.c.

◆ epr_trim_string()

char* epr_trim_string ( char *  str)

Definition at line 247 of file epr_string.c.

◆ stricmp()

int stricmp ( const char *  s1,
const char *  s2 
)

Non-ANSI string compare (ignores case).

Definition at line 378 of file epr_string.c.