model_server/els/src/str_utils.cxx
/*************** utility functions for working with strings ************/
/* extract <name> from the following string: <anything>ch1<name>ch2<anything>
   and return pointer to a char after ch2 or NULL if an error occured */
utility functions for working with strings
extract  from the following string: ch1ch2
and return pointer to a char after ch2 or NULL if an error occured
utility functions for working with strings extract from the following string : ch1ch2 and return pointer to a char after ch2 or NULL if an error occured
char* extract_str(char* from, char ch1, char ch2, char* to)
{
    char* start = strchr(from, ch1);
    if (start == NULL) return NULL;
    start += 1;
    char* end = strchr(start, ch2);
    if (end == NULL) return NULL;
    *end = '\0';
    strcpy(to, start);
    *end = ch2;
    return end + 1;
}
char * extract_str ( char * from , char ch1 , char ch2 , char * to ) { char * start = strchr ( from , ch1 ) ; if ( start == NULL ) return NULL ; start += 1 ; char * end = strchr ( start , ch2 ) ; if ( end == NULL ) return NULL ; * end = ' \0 ' ; strcpy ( to , start ) ; * end = ch2 ; return end + 1 ; }
utility functions for working with strings
extract <name> from the following string: <anything>ch1<name>ch2<anything>
and return pointer to a char after ch2 or NULL if an error occured
utility functions for working with strings extract <name > from the following string : <anything > ch1<name > ch2<anything > and return pointer to a char after ch2 or NULL if an error occured