From d0c624e31971745f627ac91eb8dd8aa905c60b88 Mon Sep 17 00:00:00 2001 From: Rockingcool Date: Tue, 4 Apr 2023 08:07:08 -0500 Subject: [PATCH] Added helper functions for file manipulation --- file_helpers.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 file_helpers.h diff --git a/file_helpers.h b/file_helpers.h new file mode 100644 index 0000000..5ceaa3d --- /dev/null +++ b/file_helpers.h @@ -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);