bool isStringNumber(string str){
for(int i=0;i<str.length();i++){
if(str[i]<'0'||str[i]>'9'){
return false;
}
}
return true;
}
//Beleive in Allah!
//just my slogan
bool isParam (string line)
{
if (isdigit(atoi(line.c_str())))
return true;
return false;
}
bool is_number(const std::string& s)
{
std::string::const_iterator it = s.begin();
while (it != s.end() && std::isdigit(*it)) ++it;
return !s.empty() && it == s.end();
}
Code Example |
---|
Cpp :: avrational compare |
Cpp :: npm install error |
Cpp :: modify file cpp |
Cpp :: c++ system delay |
Cpp :: messagebox windows |
Cpp :: c++ example |
Cpp :: compile cpp with specific version |
Cpp :: c++ colour text |
Cpp :: c++ print hello world |
Cpp :: c++ allocate and free dynamic 2d array |
Cpp :: you wanna import math on c++ |
Cpp :: rotation to vector2 godot |
Cpp :: constant pointer c++ |
Cpp :: nth permutation c++ stl |
Cpp :: shuffle elements c++ |
Cpp :: screen record ios simulator |
Cpp :: c++ vector combine two vectors |
Cpp :: c++ overwrite file |
Cpp :: calculate how many liters would be needed |
Cpp :: cout hello world |
Cpp :: vector of structs c++ |
Cpp :: cout char32_t c++ |
Cpp :: Modulo Exponentiaon,Iteratve Modulo Exponentiation |
Cpp :: format c++ discord |
Cpp :: removing a character from a string in c++ |
Cpp :: cin.get vs cin.getline in c++ |
Cpp :: c++ memory leak |
Cpp :: how to check if a value is inside an array in c++ |
Cpp :: adding elements to a vector c++ |
Cpp :: how to do nCr in c++ |