ParseableString

com.phasmidsoftware.tableparser.core.parse.Parseable.ParseableString
See theParseableString companion object
trait ParseableString extends Parseable[String]

Parser of String. The exception is useful for ensuring a None in the case of an optional String.

Attributes

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

Members list

Value members

Concrete methods

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

Parses the given input string and applies an optional modifier. If the input string is empty, it returns a failure with a BlankException. Otherwise, it returns the input string wrapped in a success.

Parses the given input string and applies an optional modifier. If the input string is empty, it returns a failure with a BlankException. Otherwise, it returns the input string wrapped in a success.

Value parameters

optModifier

an optional modifier that could be applied during the parse operation. This parameter is not utilized in the current implementation.

s

the input string to be parsed. Should not be empty.

Attributes

Returns

a Success containing the input string if it's non-empty, or a Failure containing a BlankException if the string is empty.