Dawn/include/dawn/util/string.h
2021-08-10 09:42:15 -07:00

28 lines
756 B
C

/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../libs.h"
#define STRING_HANDLEBAR_KEY_MAXLENGTH 32
#define STRING_HANDLEBAR_LIST_VARIABLE_SIZE 512
#define STRING_HANDLEBAR_LIST_VARIABLE_COUNT 64
/** Representation of a String Handlebar Variable */
typedef struct {
/** The key to use to replace in the source */
char *key;
/** The value to replace it with */
char *value;
} stringhandlebarvariable_t;
typedef struct {
char buffer[
STRING_HANDLEBAR_LIST_VARIABLE_SIZE * STRING_HANDLEBAR_LIST_VARIABLE_COUNT
];
stringhandlebarvariable_t variables[STRING_HANDLEBAR_LIST_VARIABLE_COUNT];
} stringhandlebarvariablelist_t;