aboutsummaryrefslogtreecommitdiff
path: root/src/helper.c
blob: 34fd560fcf54804ada86f9439e914b1eef9ad4c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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));
}