View Source Ash.CiString (ash v2.7.1)

Represents a case insensitive string

While some data layers are aware of case insensitive string types, in order for values of this type to be used in other parts of Ash Framework, it has to be embedded in a module this allows us to implement the Comparable protocol for it.

For the type implementation, see Ash.Type.CiString

Link to this section Summary

Functions

Creates a case insensitive string

Returns the downcased value, only downcasing if it hasn't already been done

Link to this section Types

@type t() :: %Ash.CiString{
  case: nil | :lower | :upper,
  casted?: boolean(),
  string: String.t()
}

Link to this section Functions

Link to this function

new(value, casing \\ nil)

View Source

Creates a case insensitive string

Link to this function

to_comparable_string(value)

View Source

Returns the downcased value, only downcasing if it hasn't already been done