---
title: "toggleAutomaticDashSubstitution(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextview/toggleautomaticdashsubstitution(_:)"
---

# toggleAutomaticDashSubstitution(_:)

Toggles the state of the automatic dash substitution.

## Declaration

```swift
func toggleAutomaticDashSubstitution(_ sender: Any?)
```

## Parameters

- `sender`: The control sending the message. May be nil.

## Discussion

Discussion Turning on automatic dash substitution enables automatic conversion of sequences of ASCII hyphen (-) characters to typographic dashes.

## See Also

### Checking and substituting text

- [checkTextInDocument(_:)](appkit/nstextview/checktextindocument(_:).md)
- [checkTextInSelection(_:)](appkit/nstextview/checktextinselection(_:).md)
- [checkText(in:types:options:)](appkit/nstextview/checktext(in:types:options:).md)
- [handleTextCheckingResults(_:forRange:types:options:orthography:wordCount:)](appkit/nstextview/handletextcheckingresults(_:forrange:types:options:orthography:wordcount:).md)
- [enabledTextCheckingTypes](appkit/nstextview/enabledtextcheckingtypes.md)
- [isAutomaticDashSubstitutionEnabled](appkit/nstextview/isautomaticdashsubstitutionenabled.md)
- [isAutomaticDataDetectionEnabled](appkit/nstextview/isautomaticdatadetectionenabled.md)
- [toggleAutomaticDataDetection(_:)](appkit/nstextview/toggleautomaticdatadetection(_:).md)
- [isAutomaticSpellingCorrectionEnabled](appkit/nstextview/isautomaticspellingcorrectionenabled.md)
- [toggleAutomaticSpellingCorrection(_:)](appkit/nstextview/toggleautomaticspellingcorrection(_:).md)
- [isAutomaticTextReplacementEnabled](appkit/nstextview/isautomatictextreplacementenabled.md)
- [toggleAutomaticTextReplacement(_:)](appkit/nstextview/toggleautomatictextreplacement(_:).md)
- [performValidatedReplacement(in:with:)](appkit/nstextview/performvalidatedreplacement(in:with:).md)
