mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
helpers: add isDigitWord() function
returns true if all chars of string parameter are digits
Origin commit data
------------------
Branch: ni/coolstream
Commit: 205bbeb7ce
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-03-28 (Thu, 28 Mar 2019)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1929,4 +1929,13 @@ std::string encodeUrl(std::string txt)
|
||||
return txt;
|
||||
}
|
||||
|
||||
bool isDigitWord(std::string str)
|
||||
{
|
||||
for (size_t i=0; i < str.size(); i++)
|
||||
if (!isdigit(str[i]))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user