str.h 410 B

1234567891011121314151617181920212223
  1. #ifndef DYMC_STR_H_
  2. #define DYMC_STR_H_
  3. #include <stdio.h>
  4. #include <stddef.h>
  5. char *str_strip(const char *str);
  6. // return: vec of char*
  7. void *str_split(const char *str, char delim);
  8. // string stream
  9. void* new_ss();
  10. void ss_add(void *self, char *format, ...);
  11. void ss_addc(void *self, char c);
  12. char *ss_cstr(void *self);
  13. size_t ss_size(void* self);
  14. char *fgetline(FILE *fp);
  15. int fpeek(FILE *fp);
  16. #endif