fichiers organisés
This commit is contained in:
30
d06/ex00/srcs/checkChar.cpp
Normal file
30
d06/ex00/srcs/checkChar.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cctype> // isdigit()
|
||||
#include "color.h"
|
||||
|
||||
//Char toChar(str) {
|
||||
//
|
||||
//}
|
||||
|
||||
bool isChar(std::string str) {
|
||||
if (str.length() != 1 || isdigit(str[0]))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool checkChar(std::string str) {
|
||||
|
||||
// char c;
|
||||
|
||||
std::cout << "char\n";
|
||||
|
||||
if (str.length() != 1 || isdigit(str[0]))
|
||||
return false;
|
||||
|
||||
// c = toChar(str);
|
||||
// std::cout << "char"RESET" equal to : "B_CYAN << c << RESET << "\n";
|
||||
// fromChar(c);
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user