r3/include/r3_slug.h

31 lines
725 B
C
Raw Normal View History

2014-05-14 22:10:34 -04:00
/*
2014-05-16 08:22:25 -04:00
* r3_str.h
2014-06-27 01:24:40 -04:00
* Copyright (C) 2014 c9s <yoanlin93@gmail.com>
2014-05-14 22:10:34 -04:00
*
* Distributed under terms of the MIT license.
*/
#ifndef R3_SLUG_H
#define R3_SLUG_H
2014-05-14 22:10:34 -04:00
2015-08-27 01:58:36 -04:00
#ifdef __cplusplus
extern "C" {
#endif
2014-05-15 10:57:13 -04:00
char * r3_slug_compile(const char * str, unsigned int len);
char * r3_slug_find_pattern(const char *s1, unsigned int str_len, unsigned int *len);
char * r3_slug_find_name(const char *s1, unsigned int str_len, unsigned int *len);
char * r3_slug_find_placeholder(const char *s1, unsigned int str_len, unsigned int *len);
int r3_slug_count(const char * needle, int len, char **errstr);
char * r3_inside_slug(const char * needle, int needle_len, char *offset, char **errstr);
2014-05-15 00:53:48 -04:00
2015-08-27 01:58:36 -04:00
#ifdef __cplusplus
}
#endif
2014-05-15 08:38:07 -04:00
#endif /* !R3_SLUG_H */