-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.cpp
executable file
·24 lines (22 loc) · 1.1 KB
/
utils.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* utils.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jjosephi <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/25 08:06:34 by jjosephi #+# #+# */
/* Updated: 2020/05/25 08:06:34 by jjosephi ### ########.fr */
/* */
/* ************************************************************************** */
#include "server.hpp"
std::string get_extension(std::string filename)
{
int i = 0;
for (; i < filename.length(); i++)
{
if (filename[i] == '.')
break;
}
return filename.substr(i, filename.length());
}