]> git.donarmstrong.com Git - biopieces.git/blob - code_c/Maasha/src/inc/strings.h
unit test of mem.c done
[biopieces.git] / code_c / Maasha / src / inc / strings.h
1 /* Remove the last char from a string. Returns the length of the chopped string.*/
2 size_t chop( char *string );
3
4 /* Removes the last char from a string if the char is a newline. */
5 /* Returns the length of the chomped string or -1 is no newline was found. */
6 size_t chomp( char *string );
7
8 /* Locate a substr in a str starting at pos allowing for a given number of mismatches. */
9 /* Returns position of match begin or -1 if not found. */
10 size_t match_substr( size_t pos, char *str, size_t str_len, char *substr, size_t substr_len, size_t mismatch );
11
12 /* Locate a substr in a str backwards starting at the end of */
13 /* str minus pos allowing for a given number of mismatches. */
14 /* Returns position of match begin or -1 if not found. */
15 size_t match_substr_rev( size_t pos, char *str, size_t str_len, char *substr, size_t substr_len, size_t mismatch );