hasSingleOccurrence
Checks if a string has a single occurrence of a search value.
Import:
import { hasSingleOccurrence } from 'obsidian-dev-utils/string';Signature:
function hasSingleOccurrence(params: HasSingleOccurrenceParams): booleanParameters:
| Parameter | Type | Description |
|---|---|---|
params | HasSingleOccurrenceParams | The parameters. |
Returns: boolean — true if the string has a single occurrence of the search value, false otherwise.
Links to this page: