Ver código fonte

[str.h] Adding global variable of a empty str

Vinicius Teshima 1 ano atrás
pai
commit
c36b70456b
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      src/str.h

+ 2 - 0
src/str.h

@@ -11,6 +11,8 @@ struct str {
 	size_t size;
 };
 
+const struct str STR_EMPTY = {"", 0};
+
 struct str_tokenizer {
 	struct str str;
 	size_t cur;