Claude Chappe' Curse - A C Game
Logo Institut d'Informatique Claude Chappe Logo Université de Le Mans Logo Raeptor Production
 
Loading...
Searching...
No Matches
stringio.h
Go to the documentation of this file.
1#include <string.h>
2
3#ifndef STRINGIO_H
4#define STRINGIO_H
5
6#ifdef _WIN32
7#define strtok_s strtok_s
8#define strtok_r strtok_s
9#else
10#define strtok_s strtok_r
11#define strtok_r strtok_r
12#endif
13
41 char * read_filef(FILE * file);
42
54char * read_file(const char * path);
55
67char * get_folder_path(const char * fullpath);
68
80char * convert_path(const char * path);
81
94char * concat_path(const char * path1, const char * path2);
95
108int find_string_index(char *str, const char * const *str_list, int list_size);
109
120char * format_escaped_newlines(char *str);
121
132int is_utf8_start_byte(unsigned char c);
133
143void remove_last_utf8_char(char *inputBuffer);
144
// end of StringIO group
146
147#endif
int find_string_index(char *str, const char *const *str_list, int list_size)
Finds the index of a string in a list of strings.
Definition stringio.c:65
char * convert_path(const char *path)
Converts backslashes in a path to forward slashes.
Definition stringio.c:51
char * read_file(const char *path)
Reads the contents of a file into a string.
Definition stringio.c:20
int is_utf8_start_byte(unsigned char c)
Checks if a byte is a valid UTF-8 start byte.
Definition stringio.c:91
char * get_folder_path(const char *fullpath)
Extracts the folder path from a full file path.
Definition stringio.c:38
char * read_filef(FILE *file)
Reads the contents of a file into a string.
Definition stringio.c:3
char * concat_path(const char *path1, const char *path2)
Concatenates two file paths.
Definition stringio.c:58
void remove_last_utf8_char(char *inputBuffer)
Removes the last UTF-8 character from a string.
Definition stringio.c:96
char * format_escaped_newlines(char *str)
Formats escaped newlines in a string.
Definition stringio.c:75