<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@contract-case/case-definition-dsl](./case-definition-dsl.md) &gt; [matchers](./case-definition-dsl.matchers.md) &gt; [strings](./case-definition-dsl.matchers.strings.md) &gt; [StringPrefix](./case-definition-dsl.matchers.strings.stringprefix.md) &gt; [(constructor)](./case-definition-dsl.matchers.strings.stringprefix._constructor_.md)

## matchers.strings.StringPrefix.(constructor)

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](./case-definition-dsl.matchers.strings.stringsuffix.md)

**Signature:**

```typescript
constructor(prefix: string, suffix: AnyStringMatcher);
```

## Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead>
<tbody><tr><td>

prefix

</td><td>

string

</td><td>

The prefix string. Must be a string and not a matcher

</td></tr>
<tr><td>

suffix

</td><td>

AnyStringMatcher

</td><td>

A string or matcher to match against the suffix.

</td></tr>
</tbody></table>
