---
title: "init(_:order:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/string/standardcomparator/init(_:order:)"
---

# init(_:order:)

Create a StandardComparator from the given StandardComparator with the given new order.

## Declaration

```swift
init(_ base: String.StandardComparator, order: SortOrder = .forward)
```

## Parameters

- `base`: The standard comparator to modify the order of.
- `order`: The initial order of the new StandardComparator.
