Pudu programming language
Menu
API reference

Std.Args.numberOf

1 declaration

fn

numberOf: &Std.Args.Args -> Str -> Option[Int]

This is a callable function.

What it does

The value an option was given, read as a whole number.

Answers nothing both when the option was absent and when what it was given

is not a number, because a caller with a fallback wants the fallback in

either case. numberOr is the form that says which happened.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.
  • Names inside [ ] are type arguments, such as the item type held by a collection.
  • Option holds Some(value) or None when no value is available.

Back to Std.ArgsSearch related declarations