strtoul#

Parse an unsigned integer from the start of a string, in a given base.

Σύνοψη#

use POSIX qw(strtoul);
my ($n, $unparsed) = strtoul("255 end", 10);

Οριακές περιπτώσεις#

  • Invalid base: returns (undef, undef) and sets $! to EINVAL.

  • Negative input: parsed and two’s-complement-cast to unsigned, matching C strtoul.

Διαφορές από το upstream#

Fully compatible with upstream POSIX.

Δείτε επίσης#

  • strtol - signed variant.