toIntEither<L> method

Either<L, int> toIntEither<L>(
  1. L onLeft()
)

Convert this String to int, returns the result of onLeft for invalid inputs.

Implementation

Either<L, int> toIntEither<L>(L Function() onLeft) =>
    Either.fromNullable(int.tryParse(this), onLeft);