https://github.com/twigphp/string-extra
Unicode/String support for Twig
https://github.com/twigphp/string-extra
php string twig twig-extension unicode
Last synced: 4 months ago
JSON representation
Unicode/String support for Twig
- Host: GitHub
- URL: https://github.com/twigphp/string-extra
- Owner: twigphp
- License: mit
- Created: 2019-10-17T07:19:59.000Z (over 6 years ago)
- Default Branch: 3.x
- Last Pushed: 2025-05-02T13:19:10.000Z (9 months ago)
- Last Synced: 2025-05-14T19:09:08.723Z (9 months ago)
- Topics: php, string, twig, twig-extension, unicode
- Language: PHP
- Size: 50.8 KB
- Stars: 211
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
String Extension
================
This package is a Twig extension that provides integration with the Symfony
String component. It provides the following filters:
* [`u`][1]: Wraps a text in a `UnicodeString` object to give access to
[methods of the class][2].
* [`slug`][3]: Wraps the [`AsciiSlugger`][4]'s `slug` method.
* [`singular`][5] and [`plural`][6]: Wraps the [`Inflector`][7] `singularize`
and `pluralize` methods.
[1]: https://twig.symfony.com/u
[2]: https://symfony.com/doc/current/components/string.html
[3]: https://twig.symfony.com/slug
[4]: https://symfony.com/doc/current/components/string.html#slugger
[5]: https://twig.symfony.com/singular
[6]: https://twig.symfony.com/plural
[7]: https://symfony.com/doc/current/components/string.html#inflector