diff options
author | lookshe <github@lookshe.org> | 2016-02-26 10:35:57 +0100 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2016-02-26 10:35:57 +0100 |
commit | 1c1f2a00d290598f050cb77ad4c846902a135f5b (patch) | |
tree | eade990c622ab4992f2ab49d6a70ce71e1a4d63e /shared.c | |
parent | 335423fb9ded67f3820f34793a7774d9f35d7c09 (diff) |
implementation to link FS#[0-9]+ to flyspray (FS#141)
Diffstat (limited to 'shared.c')
-rw-r--r-- | shared.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -600,3 +600,11 @@ char *get_mimetype_for_filename(const char *filename) fclose(file); return NULL; } + +char* sub_str(const char* text, int begin, int end) +{ + char* sub = (char*) malloc(sizeof(char) * ((end - begin) + 1)); + strncpy(sub, text + begin, end - begin); + sub[end - begin] = '\0'; + return sub; +} |