import SDGCollation .product(name: "SDGCollation", package: "SDGCornerstone")
Structure

CollationOrder

A collation order for sorting strings.

Declaration

struct CollationOrder

Type Properties

root

The root collation order.

Methods

indices(for:) where S : StringFamily

Returns the collation indices for a particular string.

stringsAreOrderedAscending(_:_:) where S : StringFamily

Returns whether or not the strings are sorted in ascending order.

stringsAreOrderedEqual(_:_:) where S : StringFamily

Returns whether or not the strings are sorted equal.

tailored(accordingTo:)

Returns a tailored order by appling the provided rules.

Decodable

init(from:)

Encodable

encode(to:)

FileConvertible

init(file:origin:)

Creates an instance using raw data from a file on the disk.

#if !PLATFORM_LACKS_FOUNDATION_FILE_MANAGER
init(from:)

Loads the file at the specified URL.

file

A binary representation that can be written as a file.

#if !PLATFORM_LACKS_FOUNDATION_FILE_MANAGER
save(to:)

Saves the file to the specified URL.

macOS Windows Web Ubuntu tvOS iOS Android Amazon Linux watchOS