ParseableInt

com.phasmidsoftware.tableparser.core.parse.Parseable.ParseableInt
See theParseableInt companion object
trait ParseableInt extends Parseable[Int]

Parser of Int.

Attributes

Companion
object
Graph
Supertypes
trait Parseable[Int]
class Object
trait Matchable
class Any
Known subtypes
object ParseableInt

Members list

Value members

Concrete methods

def parse(s: String, optModifier: Option[String]): Try[Int]

Parses a given string into an integer while optionally considering a modifier. CONSIDER supporting different radix

Parses a given string into an integer while optionally considering a modifier. CONSIDER supporting different radix

This method attempts to interpret the input string s using the specified transformation logic. If the input cannot be parsed into an integer, it falls back to a recovery mechanism that produces an appropriate error message.

Value parameters

optModifier

an optional modifier that could influence parsing behavior or interpretation, though it is currently unused.

s

the string input to parse as an integer.

Attributes

Returns

a Try of Int, which will be a Success wrapping the integer if parsing is successful, or a Failure if parsing fails.