Skip to content

ensureEndsWith

Ensures that a string ends with the specified suffix, adding it if necessary.

Import:

import { ensureEndsWith } from 'obsidian-dev-utils/string';

Signature:

function ensureEndsWith(params: EnsureEndsWithParams): string

Parameters:

ParameterTypeDescription
paramsEnsureEndsWithParamsThe parameters.

Returns: string — The string that ends with the suffix.


Links to this page: