---
title: String.StandardComparator
framework: swift
role: symbol
role_heading: Structure
path: swift/string/standardcomparator
---

# String.StandardComparator

Compares Strings using one of a fixed set of standard comparison algorithms.

## Declaration

```swift
struct StandardComparator
```

## Topics

### Initializers

- [init(_:order:)](swift/string/standardcomparator/init(_:order:).md)

### Type Properties

- [lexical](swift/string/standardcomparator/lexical.md)
- [localized](swift/string/standardcomparator/localized.md)
- [localizedStandard](swift/string/standardcomparator/localizedstandard.md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SortComparator](foundation/sortcomparator.md)
