skunkworks-c/include/str.h

17 lines
663 B
C
Raw Permalink Normal View History

2023-02-25 00:14:05 +01:00
#ifndef GUARD_0941C997CB4D2297C8FEA1374912B5D1
#define GUARD_0941C997CB4D2297C8FEA1374912B5D1
2023-02-27 01:56:35 +01:00
#include "types.h"
2023-02-26 23:29:17 +01:00
char *sw_str_concat(char *a, char *b);
char *sw_str_concat3(char *a, char *b, char *c);
char *sw_str_concat4(char *a, char *b, char *c, char *d);
char *sw_str_dup(char *str);
2023-02-27 01:56:35 +01:00
i32 sw_str_index(char *str, char *substr); /* returns -1 if not found */
/* allocates out1 and out2... unless split not found, then both are set to 0 */
void sw_str_split2(char *str, char *split, char **out1, char **out2);
bool sw_str_startswith(char *str, char *start);
char *sw_str_sub(char *str, u32 start, u32 len);
2023-02-25 00:14:05 +01:00
#endif /* GUARD_0941C997CB4D2297C8FEA1374912B5D1 */