-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathutils.hpp
More file actions
38 lines (30 loc) · 1.43 KB
/
utils.hpp
File metadata and controls
38 lines (30 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* utils.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mgo <mgo@student.42seoul.kr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/08 12:32:11 by mgo #+# #+# */
/* Updated: 2022/09/08 12:32:12 by mgo ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef UTILS_HPP
# define UTILS_HPP
# include <string>
typedef enum e_port
{
WELL_KNOWN_PORT,
REGISTERED_PORT,
DYNAMIC_PORT,
INVALID_PORT
} t_port;
bool isNotAlnumAndUnderscore(const std::string& str);
bool isOnlyNums(std::string str);
bool isSpecialCharactor(const std::string& str);
bool isValidPort(const std::string& port);
t_port getPortType(int value);
bool setPortNumber(const char *str, int *o_value);
bool isValidPwd(const std::string& pwd);
std::vector<std::string> split(std::string input, char delimiter);
#endif