fs Add tree subcommand
This commit is contained in:
@ -172,3 +172,14 @@ char *string_tokenizealloc(char *s, char *delim) {
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/questions/2488563/strcat-implementation
|
||||
char *string_combine(char *dest, const char *src) {
|
||||
size_t i, j;
|
||||
for(i = 0; dest[i] != '\0'; i++);
|
||||
for(j = 0; src[j] != '\0'; j++) {
|
||||
dest[i+j] = src[j];
|
||||
}
|
||||
dest[i+j] = '\0';
|
||||
return dest;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ char *string_strcpy(char *dest, const char *src);
|
||||
char *string_strchr(const char *s, int c);
|
||||
int string_strncmp(const char * s1, const char * s2, size_t n);
|
||||
char *string_tokenizealloc(char *s, char *delim);
|
||||
char *string_combine(char *dest, const char *src);
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user