StringEditDistance

org.specs2.text.StringEditDistance$
See theStringEditDistance companion trait

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited classlikes

final case class Delimiter(value: String) extends Token

Attributes

Inherited from:
DiffShortener
Supertypes
trait Serializable
trait Product
trait Equals
trait Token
class Object
trait Matchable
class Any
Show all
final case class End() extends Token

Attributes

Inherited from:
DiffShortener
Supertypes
trait Serializable
trait Product
trait Equals
trait Token
class Object
trait Matchable
class Any
Show all
final case class Keep(value: String) extends Token

Attributes

Inherited from:
DiffShortener
Supertypes
trait Serializable
trait Product
trait Equals
trait Token
class Object
trait Matchable
class Any
Show all
final case class Start() extends Token

Attributes

Inherited from:
DiffShortener
Supertypes
trait Serializable
trait Product
trait Equals
trait Token
class Object
trait Matchable
class Any
Show all
case class StringDelimiter(separators: String)

Create delimiter characters

Create delimiter characters

Attributes

Inherited from:
StringEditDistance
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait Token

Attributes

Inherited from:
DiffShortener
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Delimiter
class End
class Keep
class Start

Value members

Inherited methods

def editDistance(s1: String, s2: String): Int

Attributes

Inherited from:
StringEditDistance
def foldSplittedStrings[T](s1: String, s2: String, init: T, f: (T, String, String) => T): T

apply edit distance functions on strings split on newlines so that there are no memory issues

apply edit distance functions on strings split on newlines so that there are no memory issues

Attributes

Inherited from:
StringEditDistance
def shorten(string: String, firstDelimiter: String, secondDelimiter: String, shortenSize: Int): String

Attributes

Inherited from:
DiffShortener
def shortenTokens(tokens: List[Token], firstDelimiter: Delimiter, secondDelimiter: Delimiter, shortenSize: Int): List[Token]

Attributes

Inherited from:
DiffShortener
def showDiffs(operations: IndexedSeq[EditDistanceOperation[Char]], separators: String, shortenSize: Int): List[Token]

Attributes

Inherited from:
StringEditDistance
def showDistance(s1: String, s2: String, separators: String, shortenSize: Int): (String, String)

Value parameters

separators

separators used to highlight differences. If sep is empty, then no delimiter is used. If sep contains one character, it is taken as the unique delimiter. If sep contains 2 or more characters, the first half of the characters are taken as opening delimiter and the second half as closing delimiter.

Attributes

Returns

a (String, String) displaying the differences between each input strings. The used separators are specified by the caller. The string is shortened before and after differences if necessary.

Inherited from:
StringEditDistance
def showToken(r: Token): String

Attributes

Inherited from:
DiffShortener
def tokensSize(tokens: List[Token]): Int

Attributes

Inherited from:
DiffShortener

Extensions

Inherited extensions

extension (tokens: List[Token])(tokens: List[Token])
def showTokens: String

Attributes

Inherited from:
DiffShortener