isOctal property

bool get isOctal

Returns true if string is Octal string. Octal String: only contains digits 0-7.

"xyz".isOctal;    // false
"071".isOctal;    // true

Implementation

bool get isOctal => toInt(base: 8) != null;