PHPackages                             pointybeard/helpers-functions-strings - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pointybeard/helpers-functions-strings

ActiveLibrary

pointybeard/helpers-functions-strings
=====================================

A collection of functions for manipulating strings

1.1.3(6y ago)04.4k↓50%16MITPHPPHP &gt;=7.2

Since May 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/pointybeard/helpers-functions-strings)[ Packagist](https://packagist.org/packages/pointybeard/helpers-functions-strings)[ Docs](https://github.com/pointybeard/helpers-functions-strings)[ RSS](/packages/pointybeard-helpers-functions-strings/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (6)Used By (6)

PHP Helpers: String Functions
=============================

[](#php-helpers-string-functions)

- Version: v1.1.3
- Date: April 10 2020
- [Release notes](https://github.com/pointybeard/helpers-functions-strings/blob/master/CHANGELOG.md)
- [GitHub repository](https://github.com/pointybeard/helpers-functions-strings)

A collection of functions for manipulating strings

Installation
------------

[](#installation)

This library is installed via [Composer](http://getcomposer.org/). To install, use `composer require pointybeard/helpers-functions-strings` or add `"pointybeard/helpers-functions-strings": "~1.1.0"` to your `composer.json` file.

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

### Requirements

[](#requirements)

There are no particuar requirements for this library other than PHP 7.2 or greater.

To include all the [PHP Helpers](https://github.com/pointybeard/helpers) packages on your project, use `composer require pointybeard/helpers` or add `"pointybeard/helpers": "~1.2.0"` to your composer file.

Usage
-----

[](#usage)

This library is a collection convenience function for common tasks relating to string manipulation. They are included by the vendor autoloader automatically. The functions have a namespace of `pointybeard\Helpers\Functions\Strings`

The following functions are provided:

- `utf8_wordwrap`
- `utf8_wordwrap_array`
- `type_sensitive_strval`
- `mb_str_pad`
- `replace_placeholders_in_string`
- `random_string`
- `random_unique_classname`
- `encode_ampersands`

Example usage:

```
