StringMonoid

class StringMonoid extends Monoid[String]
trait Monoid[String]
trait Semigroup[String]
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

def combine(x: String, y: String): String
override def combineAll(xs: IterableOnce[String]): String
Definition Classes
def empty: String
override def reverse: Monoid[String]
Definition Classes

Inherited methods

override def combineAllOption(as: IterableOnce[String]): Option[String]
Definition Classes
Inherited from
Monoid
override def combineN(a: String, n: Int): String

Return a appended to itself n times.

Return a appended to itself n times.

Example:

scala> import cats.kernel.instances.string._

scala> Monoid[String].combineN("ha", 3)
res0: String = hahaha

scala> Monoid[String].combineN("ha", 0)
res1: String = ""
Definition Classes
Inherited from
Monoid
def intercalate(middle: String): Semigroup[String]

Between each pair of elements insert middle This name matches the term used in Foldable and Reducible and a similar Haskell function.

Between each pair of elements insert middle This name matches the term used in Foldable and Reducible and a similar Haskell function.

Inherited from
Semigroup
def isEmpty(a: String)(ev: Eq[String]): Boolean

Tests if a is the identity.

Tests if a is the identity.

Example:

scala> import cats.kernel.instances.string._

scala> Monoid[String].isEmpty("")
res0: Boolean = true

scala> Monoid[String].isEmpty("something")
res1: Boolean = false
Inherited from
Monoid