2017 © Pedro Peláez
 

library php-string-plus

More string helpers for PHP

image

spiegeleye/php-string-plus

More string helpers for PHP

  • Wednesday, March 11, 2015
  • by cloudunder
  • Repository
  • 1 Watchers
  • 0 Stars
  • 335 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

php-string-plus

More string helpers for PHP (and Laravel)., (*1)

Build Status Latest Stable Version Latest Unstable Version License Total Downloads, (*2)

Usage

Require the package in your composer.json file:, (*3)

"spiegeleye/php-string-plus": "1.3.*", (*4)

In your PHP file add use StrPlus\StrPlus; for convenience., (*5)

Helpers

StrPlus::replace_control_chars($replace, $string), (*6)

Replaces non-printable control characters in $string with $replace., (*7)

StrPlus::single_line($string), (*8)

Converts a multi-line text to a text without line breaks or other non-printable characters. Multiple successive spaces are reduced to one sinle space., (*9)

StrPlus::function html_to_single_line_text($string), (*10)

Converts a HTML formatted block to a plain text one-line string without non-printable characters., (*11)

StrPlus::multi_line_text_to_html($string), (*12)

Converts a multi-line plain text string to a multi-line HTML string where line breaks become <br> tags., (*13)

StrPlus::limit($string, $limit, $end = null, $preserve_words = true), (*14)

Limit string to a number of characters and preserve words where possible (optional; default is true). If $end is not set or null the default character will be used., (*15)

The Versions

11/03 2015

dev-master

9999999-dev https://cloudunder.io/

More string helpers for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Nick Zahn

11/03 2015

1.3.0

1.3.0.0 https://cloudunder.io/

More string helpers for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Nick Zahn

14/12 2014

1.2.0

1.2.0.0 https://spiegeleye.uk/

More string helpers for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Andre Zahn

10/10 2014

1.1.1

1.1.1.0 https://spiegeleye.uk/

More string helpers for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Andre Zahn

08/10 2014

1.1.0

1.1.0.0 http://spiegeleye.uk/

More string helpers for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Andre Zahn