aboutsummaryrefslogtreecommitdiff
path: root/src/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper.c')
-rw-r--r--src/helper.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/helper.c b/src/helper.c
new file mode 100644
index 0000000..34fd560
--- /dev/null
+++ b/src/helper.c
@@ -0,0 +1,21 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* helper.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/05/11 14:55:27 by charles #+# #+# */
+/* Updated: 2020/05/11 14:57:29 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "scop.h"
+
+bool has_extension(char *filepath, char *extension)
+{
+ char *match;
+
+ match = ft_strstr(filepath, extension);
+ return (match != NULL && ft_strlen(match) == ft_strlen(extension));
+}