Download the PHP package bvp/trimmer without Composer
On this page you can find all versions of the php package bvp/trimmer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package trimmer
Trimmer for Boatrace Venture Project
日本語
BVP Trimmer is a PHP library that extends the built-in functions trim
, ltrim
, and rtrim
and allows you to recursively trim arrays and objects as well.
📦 Requirements
- PHP: ^8.2
- myclabs/deep-copy: ^1.11
💾 Installation
⚡ Usage
Supported Methods
Method | Description | Parameters |
---|---|---|
Trimmer::trim( $value, $characters = null ) |
Trims strings, arrays, and objects | $value : string | array | object$characters : Characters to remove (optional) |
Trimmer::ltrim( $value, $characters = null ) |
Left-side trimming | Same as above |
Trimmer::rtrim( $value, $characters = null ) |
Right-side trimming | Same as above |
Basic Usage
Trimmer::trim() - Trimming Arrays
Trimmer::trim() - Trimming Objects
To trim object properties, you must provide getter and setter methods. Nested objects are also supported.
Nested objects are also supported:
⚠️ Notes
Trimmer::trim
,Trimmer::ltrim
, andTrimmer::rtrim
are non-destructive. They return new values without modifying the originals.- Object properties without both getter and setter methods cannot be trimmed.
📄 License
Trimmer is open-source software released under the MIT license.
All versions of trimmer with dependencies
PHP Build Version
Package Version
The package bvp/trimmer contains the following files
Loading the files please wait ....