]> git.donarmstrong.com Git - biopieces.git/blob - code_c/Maasha/src/inc/strings.h
removed debug message
[biopieces.git] / code_c / Maasha / src / inc / strings.h
1 /* Martin Asser Hansen (mail@maasha.dk) Copyright (C) 2008 - All right reserved */
2
3 /* Remove the last char from a string. Returns the length of the chopped string.*/
4 size_t chop( char *string );
5
6 /* Removes the last char from a string if the char is a newline. */
7 /* Returns the length of the chomped string or -1 is no newline was found. */
8 size_t chomp( char *string );
9
10 /* Returns the total number of a given char in a given string. */
11 size_t strchr_total( const char *string, const char c );
12
13 /* Locate a substr in a str starting at pos allowing for a given number of mismatches. */
14 /* Returns position of match begin or -1 if not found. */
15 size_t match_substr( size_t pos, char *str, size_t str_len, char *substr, size_t substr_len, size_t mismatch );
16
17 /* Locate a substr in a str backwards starting at the end of */
18 /* str minus pos allowing for a given number of mismatches. */
19 /* Returns position of match begin or -1 if not found. */
20 size_t match_substr_rev( size_t pos, char *str, size_t str_len, char *substr, size_t substr_len, size_t mismatch );