painless-php / string
String helper functionality for PHP
v2.1.0
2025-06-01 13:51 UTC
Requires
- php: >=8.1
- ext-mbstring: *
Requires (Dev)
- phpbench/phpbench: ^1.2
- phpunit/phpunit: ^10.1
- spatie/phpunit-watcher: ^1.22
- vlucas/phpdotenv: ^v5.5.0
This package is auto-updated.
Last update: 2025-06-01 13:53:22 UTC
README
String helper functionality for PHP
Installation
composer require painless-php/string
Public API
Core
Exception
PainlessPHP\String\Exception\StringSearchException
PainlessPHP\String\Exception\StringTypeConversionException
Development
Dynamic method doc generation
Use php bin/generate_builder_docblock.php
to generate phpdocumentor docblocks
for the methods that can be called dynamically from StrBuilder.
TODO
-
generate Str method list in docs with a markdown table
-
bump required php version to 8.4 and add
$builder->str
getter for the result string -
methods
- findFirstLineContaining
- findLinesContaining
- findLastLineContaining
- trimLines
- editLines