Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 4 days ago
JSON representation

Some useful functions for working with strings

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 .