Skip to content

tafhyseni/stringify

Repository files navigation

Stringify 👨‍🎨

A framework agnostic string manipulation package. Start ❤️ string manipulations again! Feeling paranoid about string manipulations? Hating regex? Hating string chunks, replacements, concatinations? This package is for you!

System Requirements

  • PHP >= 7.2 (the latest stable version of PHP is highly recommended)

Installation

composer require tafhyseni/stringify

Usage

Stringify is a package made for human. Makes manipulation easier, simpler and elegant.

use \Tafhyseni\Stringify\Stringify;

Examples

Cutting a string after a certain word

Stringify::parse('Cut this string from here...')->removeAfter('from')->get();

Removing x-number of last characters

Stringify::parse('Remove3ofmylastcharacters')->removeLastChars(3)->get();

Removing HTML from a string/text expect a certain tag

$htmlInput = "<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>";

Stringify::parse('<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>')->removeHtmlExpect('<a>');

Documentation

Please see DOCUMENTATION for all available methods on string/text/html manipulation.

Testing

./vendor/bin/pest

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

A magical string helper buddy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages