aboutsummaryrefslogtreecommitdiff
path: root/src/types/str.h
blob: 86490cc96de870d89383057bdaafcc699d48785b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef __STR_H
#define __STR_H

#include <string.h> 
#include <stdio.h>
#include <stdlib.h>

typedef struct {
  size_t len;
  size_t _bytes; //may be used in the future
  char* c; 
} str;

str* str_initl(const char*, size_t len);
str* str_init(const char*);
void str_free(str*);
void str_push(str*, const char*);
void str_pushl(str*, const char*, size_t);
void str_clear(str*);
void str_popf(str*, int);
void str_popb(str*, int);
#endif //__STR_H