bool isDigit() - JanKulbaga/String-CPP GitHub Wiki

bool isDigit()

Checks whether all the characters in a string are digits.

Example

#include "src/String.h"

int main()
{
    String s = "Hello World";
    String s1 = "0123456789";
    s.isDigit(); // gives value 0
    s1.isDigit(); // gives value 1
    return 0;
}

Parameters

None

Return value

Returns true if all the characters are digits, otherwise false