-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmojicodeString.h
executable file
·37 lines (26 loc) · 1.01 KB
/
EmojicodeString.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// String.h
// Emojicode
//
// Created by Theo Weidmann on 02.02.15.
// Copyright (c) 2015 Theo Weidmann. All rights reserved.
//
#ifndef __Emojicode__String__
#define __Emojicode__String__
#include "EmojicodeAPI.h"
#include "EmojicodeList.h"
extern Object **stringPool;
#define emptyString (stringPool[0])
#define characters(string) ((EmojicodeChar*)(string)->characters->value)
/** Comparse if the value of a is equal to b */
bool stringEqual(String *a, String *b);
/** Converts the string to a UTF8 char array. @warning Do not forget to free the char array. */
char* stringToChar(String *str);
/** Creates a string from a UTF8 C string. The string must be null terminated! */
Object* stringFromChar(const char *cstring);
void stringMark(Object *self);
void initStringFromSymbolList(Object *string, List *list);
MethodHandler stringMethodForName(EmojicodeChar name);
InitializerHandler stringInitializerForName(EmojicodeChar name);
Something parseJSON(Thread *thread);
#endif /* defined(__Emojicode__String__) */