for int time length if isdigit time colon_pos return false

1
2
3
4
5
6
7
for(int i = 0; i < time.length(); ++i)
{
if(!isdigit(time[i]) && i != colon_pos)
{
return false;
}
}