Skip to main content

StringPrefix

Matches any string that begins with the given constant string prefix, and ends with a matchable suffix.

At match time, the actual string is checked for the constant prefix, and then the rest of the string is passed to the suffix matcher..

The suffix matcher must be expecting a string.

See also StringSuffix

import { matchers } from '@contract-case/case-definition-dsl'

new matchers.strings.StringPrefix(prefix: string, suffix: any)

Parameters

NameTypeDescription
prefixstringThe prefix string.
Must be a string and not a matcher
suffixanyA string or matcher to match against the suffix.