Function parseOctal

  • Parses a string to a octal number.

    Remarks

    Parses a string to a octal number, returning undefined instead of NaN if it fails.

    Example

    parseOctal("101"); // 0o101 -> 65
    parseOctal("101.5"); // 0o101 -> 65
    parseOctal("invalid"); // undefined

    See

    parseInteger

    Parameters

    • string: string

      String to be parsed.

    Returns Maybe<number>

    Parsed number or undefined if it fails.