Initial commit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user