<!-- 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)

## matchers.strings namespace

## Classes

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

Class

</th><th>

Description

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

[AnyString](./case-definition-dsl.matchers.strings.anystring.md)

</td><td>

Matches any string.

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

[Base64Encoded](./case-definition-dsl.matchers.strings.base64encoded.md)

</td><td>

Transformation matcher that matches a base64 encoded version of the given string or string matcher

WARNING: Since many strings are accidentally decodable as base64, this matcher is best combined with a more restrictive string matcher (eg `StringifiedJson`<!-- -->).

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

[StringContaining](./case-definition-dsl.matchers.strings.stringcontaining.md)

</td><td>

Matches any string that contains the given substring.

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

[StringifiedJson](./case-definition-dsl.matchers.strings.stringifiedjson.md)

</td><td>

Transformation matcher that matches a JSON.stringify()ed version of the given object.

For example, if the actual data is the string:

```ts
"{\"foo\":2}";
```

then you could match it with:

```ts
StringifiedJson({
  foo: 2,
});
```

or

```ts
StringifiedJson({
  foo: AnyNumber(2),
});
```

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

[StringPrefix](./case-definition-dsl.matchers.strings.stringprefix.md)

</td><td>

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)

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

[StringSuffix](./case-definition-dsl.matchers.strings.stringsuffix.md)

</td><td>

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

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

The prefix matcher must be expecting a string.

See also [StringPrefix](./case-definition-dsl.matchers.strings.stringprefix.md)

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