isOctal function

bool isOctal(
  1. String str
)

Checks if the string is an octal number.

Accepts an optional 0o prefix followed by one or more octal digits (0–7).

Example:

isOctal('0o123'); // true
isOctal('777'); // true
isOctal('088'); // false

Implementation

bool isOctal(String str) => _isOctal(str);