Packages

package ci

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ci
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class CIString extends Ordered[CIString] with Serializable

    A case-insensitive String.

    A case-insensitive String.

    Two CI strings are equal if and only if they are the same length, and each corresponding character is equal after calling either toUpper or toLower.

    Ordering is based on a string comparison after folding each character to uppercase and then back to lowercase.

    All comparisons are insensitive to locales.

    Caution: the definition of equality and .toString are inconsistent with the property of substitutability, which states that if x == y, then f(x) == f(y). This does not break the contract of .equals nor the laws of cats.Eq, but can be surprising:

    scala> val x = CIString("woof")
    val x: org.typelevel.ci.CIString = woof
    scala> val y = CIString("WOOF")
    val y: org.typelevel.ci.CIString = WOOF
    scala> def f(ci: CIString): String = ci.toString
    def f(ci: org.typelevel.ci.CIString): String
    scala> x == y
    val res0: Boolean = true
    scala> f(x) == f(y)
    val res1: Boolean = false
  2. implicit final class CIStringSyntax extends AnyRef

Value Members

  1. object CIString extends Serializable
    Annotations
    @suppressUnusedImportWarningForCompat()

Inherited from AnyRef

Inherited from Any

Ungrouped