aboutsummarylogtreecommitdiffstats
path: root/string-tick.c
diff options
context:
space:
mode:
Diffstat (limited to 'string-tick.c')
-rw-r--r--string-tick.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/string-tick.c b/string-tick.c
index f3575d01a356..701c87463135 100644
--- a/string-tick.c
+++ b/string-tick.c
@@ -1,4 +1,5 @@
#include "string-tick.h"
+#include "portfolio.h"
String* string_init(void) {
String* pString = (String*) malloc(sizeof(String));
@@ -39,6 +40,13 @@ char* strip_char(char* string, char c) {
return string;
}
+void string_write_portfolio(String* pString){
+ FILE* fp = fopen(portfolio_file, "w"); // fprintf %s won't work since there some chars are encoded to '\0', so it
+ for (int i = 0; i < (int) pString->len; i++) // will be null terminated several times in the middle
+ fputc(pString->data[i], fp);
+ fclose(fp);
+}
+
void string_destroy(String** phString) {
String* pString = *phString;
free(pString->data);