Initial commit

This commit is contained in:
2022-06-30 21:31:28 -05:00
commit e79d4aa00a
4 changed files with 177 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
#include "tstring.h"
struct __tstring {
char* Characters;
int Length;
int ByteCount;
int Capacity;
};
TString* TStringCreate(void) {
TString* string = malloc(sizeof(TString));
string->Characters = calloc(DEFAULT_TSTRING_BYTE_BUFFER, sizeof(char));
string->Capacity = DEFAULT_TSTRING_BYTE_BUFFER;
string->ByteCount = 0;
string->Length = 0;
return string;
}
void TStringAppendText(const char* text, TString* string) {
}
char* TStringGetString(const TString* string) {
}
void TStringGetGlyph(int index, char buffer[8], const TString* string) {
}
void TStringFree(TString* string) {
if (!string) return;
if (string->Characters) free(string->Characters);
free(string);
}