---
title: "lint/strings/prefer-mb-functions"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="lint/strings/prefer-mb-functions" />

Not in any set. Unsafe fix: it can change behaviour. Intent: correctness.

## What it does

Replace non multibyte-safe functions with corresponding mb function.

## Configuration

```toml title="pun.toml"
[lint.rules]
"strings/prefer-mb-functions" = "error"
```

To skip it in some files, add an [override](/docs/configuration/pun-toml#lint) or a [`@pun-ignore-file`](/docs/configuration/ignore-comments) comment.

## Replaces

- [`mb_str_functions`](https://cs.symfony.com/doc/rules/alias/mb_str_functions.html) (php-cs-fixer, risky)

[More lint/strings rules](/docs/rules/lint/strings) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
