Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ludovicm67/php-strings
Some useful functions for working with strings
https://github.com/ludovicm67/php-strings
camelcase composer composer-package ludovicm67 php php-library php7 php8 string strings
Last synced: about 1 month ago
JSON representation
Some useful functions for working with strings
- Host: GitHub
- URL: https://github.com/ludovicm67/php-strings
- Owner: ludovicm67
- License: mit
- Created: 2017-09-27T08:58:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-12T11:43:10.000Z (about 1 year ago)
- Last Synced: 2023-11-14T16:43:17.005Z (about 1 year ago)
- Topics: camelcase, composer, composer-package, ludovicm67, php, php-library, php7, php8, string, strings
- Language: PHP
- Homepage: https://packagist.org/packages/ludovicm67/strings#dev-master
- Size: 384 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Strings
> Some useful functions for working with strings
[![Latest Stable Version](https://poser.pugx.org/ludovicm67/strings/v/stable)](https://packagist.org/packages/ludovicm67/strings)
[![Total Downloads](https://poser.pugx.org/ludovicm67/strings/downloads)](https://packagist.org/packages/ludovicm67/strings)
[![Coverage Status](https://coveralls.io/repos/github/ludovicm67/php-strings/badge.svg?branch=master)](https://coveralls.io/github/ludovicm67/php-strings?branch=master)## Installation
Just run the following command: `composer require ludovicm67/strings`
to add it to your PHP project!## Getting started
If you installed using composer, you can now create a file with the following code:
```php
bold");
// will display: test& ""~ "@éa/-âå€ÊÂøʱæ€ûýþ<b>bold</b>
```### get a string from camelCase
Using `Strings::fromCamelCase("myString")` (_will return: `my-string`_).
Example:
```php
echo Strings::fromCamelCase('testFromCamelCase');
// will display: test-from-camel-case
```### transform a string to camelCase
Using `Strings::toCamelCase("my-string")` (_will return: `myString`_).
Example:
```php
echo Strings::toCamelCase('test-to-camel-case');
// will display: testToCamelCase
```## Want to contribute?
Just fork, commit and open a pull-request. Or just open an issue here:
https://github.com/ludovicm67/php-strings/issues .