mirror of
https://github.com/pret/pokeheartgold.git
synced 2026-05-11 13:24:17 -05:00
33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
#ifndef POKEHEARTGOLD_STRING_H
|
|
#define POKEHEARTGOLD_STRING_H
|
|
|
|
#include "constants/charcode.h"
|
|
#include "heap.h"
|
|
#include "string_util.h"
|
|
|
|
typedef struct STRING {
|
|
u16 maxsize;
|
|
u16 size;
|
|
u32 magic;
|
|
u16 data[0];
|
|
} STRING;
|
|
|
|
STRING *String_ctor(u32 maxsize, HeapID heapId);
|
|
void String_dtor(STRING *string);
|
|
void CopyStringToU16Array(const STRING *string, u16 *dest, u32 n);
|
|
void CopyU16ArrayToString(STRING *string, const u16 *src);
|
|
void CopyU16ArrayToStringN(STRING *string, const u16 *src, u32 n);
|
|
int StringCompare(STRING *a, STRING *b);
|
|
void StringCopy(STRING *dest, const STRING *src);
|
|
void StringSetEmpty(STRING *str);
|
|
STRING *StringDup(const STRING *src, HeapID heap_id);
|
|
void StrAddChar(STRING *str, u16 _char);
|
|
void CopyU16ArrayToString(STRING *dest, const u16 *src);
|
|
void CopyU16ArrayToStringN(STRING *dest, const u16 *src, u32 n);
|
|
u16 *String_c_str(STRING *string);
|
|
void String16_FormatInteger(STRING * str, int num, u32 ndigits, STRCONVMODE strConvMode, BOOL whichCharset);
|
|
void StrUpperCharN(STRING * str, int n);
|
|
void StringCat_HandleTrainerName(STRING * dest, STRING * src);
|
|
|
|
#endif //POKEHEARTGOLD_STRING_H
|