Strength

public enum Strength: Int32, ValueConvertible

The ICU comparison level: http://userguide.icu-project.org/collation/concepts#TOC-Comparison-Levels

  • 1: Performs comparisons of the base characters only, ignoring other differences such as diacritics and case

    Declaration

    Swift

    case primary = 1
  • 2: Performs comparisons up to secondary differences, such as diacritics.

    Declaration

    Swift

    case secondary = 2
  • 3 (default): Performs comparisons up to tertiary differences, such as case and letter variants.

    Declaration

    Swift

    case tertiary = 3
  • 4: Same as 3, but requires proper punctuation or for comparing japanese text

    Declaration

    Swift

    case quaternary = 4
  • 5: Identical texts

    Declaration

    Swift

    case identical = 5
  • Converts this Strength to a BSON.Primitive

    Declaration

    Swift

    public func makePrimitive() -> BSON.Primitive