-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathString.h
More file actions
executable file
·42 lines (26 loc) · 844 Bytes
/
String.h
File metadata and controls
executable file
·42 lines (26 loc) · 844 Bytes
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
38
39
40
41
42
/* String.h */
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "List.h"
#ifndef NEF_STRING
#define NEF_STRING 1
#define EOS '\0'
#define EOL '\n'
typedef struct String {
char * chars;
int length;
} String;
String * newString(int size);
String * constructString(char * charArray, int size);
char * asCharArray(String * source);
char * copyCharArray(char * source, int size);
String ** explode(List * separators, String * string);
void implode(String * separator, String ** strings);
String * concatStrings(String * string1, String * string2);
char charAt(String * string, int position);
int stringLength(char * charArray);
String * substringFromString(String * source, int begin, int end);
String * substringFromCharArray(char * source, int begin, int end);
void printString(String * string);
#endif