Added helper functions for file manipulation
This commit is contained in:
11
file_helpers.h
Normal file
11
file_helpers.h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/* Takes a string that represents a filename, and converts the contents
|
||||||
|
of the file into a string */
|
||||||
|
char* file_to_string(char* filename);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*Finds the number of new-line characters in the given file */
|
||||||
|
int num_of_lines(char* filename);
|
Reference in New Issue
Block a user