mb_trim

Strip whitespace (or other characters) from the beginning and end of a string

&reftitle.description; `string` `mb_trim` `string` `string` ``string``null```characters`&null; ``string``null```encoding`&null;

Performs a multi-byte safe `trim` operation, and returns a string with whitespace stripped from the beginning and end of `string`. Without the second parameter, `mb_trim` will strip these characters:

&strings.stripped.unicode;
&reftitle.parameters;

`string`

- The `string` that will be trimmed.

`characters`

- &strings.parameter.unicode.optional;

`encoding`

- &mbstring.encoding.parameter;
&reftitle.returnvalues;

The trimmed string.

&reftitle.seealso;

- `mb_ltrim`
- `mb_rtrim`
- `trim`