package ci
- Source
- package.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- ci
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- 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
ortoLower
.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 ifx == y
, thenf(x) == f(y)
. This does not break the contract of.equals
nor the laws ofcats.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
- implicit final class CIStringSyntax extends AnyRef
Value Members
- object CIString extends Serializable
- Annotations
- @suppressUnusedImportWarningForCompat()