Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/php-polyfills/mb_trim
PHP: Provides a user-land polyfill for `mb_trim`, `mb_ltrim`, and `mb_rtrim` functions added in PHP 8.4.
https://github.com/php-polyfills/mb_trim
compat mbstring php php8 php84 polyfills
Last synced: 3 months ago
JSON representation
PHP: Provides a user-land polyfill for `mb_trim`, `mb_ltrim`, and `mb_rtrim` functions added in PHP 8.4.
- Host: GitHub
- URL: https://github.com/php-polyfills/mb_trim
- Owner: PHP-Polyfills
- License: mit
- Created: 2024-01-10T09:21:26.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-03-07T08:05:58.000Z (10 months ago)
- Last Synced: 2024-10-12T13:02:18.458Z (3 months ago)
- Topics: compat, mbstring, php, php8, php84, polyfills
- Language: PHP
- Homepage: https://php.watch/versions/8.4/mb_trim-mb_ltrim-mb_rtrim
- Size: 17.6 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `mb_trim`, `mb_ltrim`, and `mb_rtrim` polyfills
[![Latest Stable Version](https://poser.pugx.org/polyfills/mb-trim/v)](https://packagist.org/packages/polyfills/mb-trim) [![License](https://poser.pugx.org/polyfills/mb-trim/license)](https://packagist.org/packages/polyfills/mb-trim) [![PHP Version Require](https://poser.pugx.org/polyfills/mb-trim/require/php)](https://packagist.org/packages/polyfills/mb-trim)
Provides user-land PHP polyfills for the [`mb_trim`, `mb_ltrim`, and `mb_rtrim` functions added in PHP 8.4](https://php.watch/versions/8.4/mb_trim-mb_ltrim-mb_rtrim).
Requires PHP 8,1, 8.2 or PHP 8.3 with `mbstring` extension. Not supported on PHP 8.4 because these functions are natively implemented in PHP 8.4.
## Installation
```bash
composer require polyfills/mb-trim
```## Usage
Simply use the `mb_trim`, `mb_ltrim`, and `mb_rtrim` functions as if they were declared already.
## Contributions
Contributions are welcome either as a GitHub issue or a PR to this repo.