JoinableStrings

com.phasmidsoftware.tableparser.core.util.Joinable.JoinableStrings
object JoinableStrings extends Joinable[Seq[String]]

Provides an implicit implementation of the Joinable type class for sequences of strings (Seq[String]). This enables sequences of strings to be combined, defines a zero value for sequences, and validates non-empty sequences.

Attributes

Graph
Supertypes
trait Joinable[Seq[String]]
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def join(t1: Seq[String], t2: Seq[String]): Seq[String]

Combines two sequences of strings into a single sequence by appending the elements of the second sequence to the elements of the first sequence.

Combines two sequences of strings into a single sequence by appending the elements of the second sequence to the elements of the first sequence.

Value parameters

t1

The first sequence of strings.

t2

The second sequence of strings to be appended to the first sequence.

Attributes

Returns

A new sequence of strings containing all the elements of t1, followed by all the elements of t2.

def valid(t: Seq[String]): Boolean

Validates if the provided sequence of strings is non-empty.

Validates if the provided sequence of strings is non-empty.

Value parameters

t

The sequence of strings to validate.

Attributes

Returns

true if the sequence is non-empty, otherwise false.

Inherited methods

def incomplete(t: Seq[String]): Boolean

Method to determine if t is an incomplete record, which must be joined to what follows it before it can be parsed: for example, a line of CSV which ends inside a quoted field (whose value contains a line break, as RFC 4180 allows). By default, nothing is incomplete.

Method to determine if t is an incomplete record, which must be joined to what follows it before it can be parsed: for example, a line of CSV which ends inside a quoted field (whose value contains a line break, as RFC 4180 allows). By default, nothing is incomplete.

Value parameters

t

a T value.

Attributes

Returns

true if t must be joined to the T that follows it.

Inherited from:
Joinable

Concrete fields

val zero: Seq[String]

Defines the zero value for sequences of strings (Seq[String]). The zero value is represented by an empty sequence (Nil) and serves as the identity element for the join operation in the Joinable type class, allowing seamless combination of string sequences while preserving the associative and identity properties.

Defines the zero value for sequences of strings (Seq[String]). The zero value is represented by an empty sequence (Nil) and serves as the identity element for the join operation in the Joinable type class, allowing seamless combination of string sequences while preserving the associative and identity properties.

Attributes