2017 © Pedro Peláez
 

library text

Text component is a set of methods to help with the manipulation of strings.

image

flextype-components/text

Text component is a set of methods to help with the manipulation of strings.

  • Tuesday, July 17, 2018
  • by Awilum
  • Repository
  • 1 Watchers
  • 0 Stars
  • 83 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 66 % Grown

The README.md

Text Component

version MIT License, (*1)

Text Component is a set of methods to help with the manipulation of strings., (*2)

Installation

composer require flextype-components/text

Usage

use Flextype\Component\Text\Text;

Translit function to convert text from one script to another., (*3)

echo Text::translitIt('Привет');

Removes any leading and traling slashes from a string, (*4)

echo Text::trimSlashes('some text here/');

Reduces multiple slashes in a string to single slashes., (*5)

echo Text::reduceSlashes('some//text//here');

Removes single and double quotes from a string, (*6)

echo Text::stripQuotes('some "text" here');

Convert single and double quotes to entities, (*7)

echo Text::quotesToEntities('some "text" here');

Creates a random string of characters, (*8)

echo Text::random();

Add's string_1 to a string or increment the ending number to allow string_2, string_3, etc, (*9)

$str = Text::increment($str);

Cut string, (*10)

echo Text::cut('Some text here', 5);

Lowercase, (*11)

echo Text::lowercase('Some text here');

Uppercase, (*12)

echo Text::uppercase('some text here');

Get length, (*13)

echo Text::length('Some text here');

Create a lorem ipsum text, (*14)

echo Text::lorem(2);

Extract the last $num characters from a string., (*15)

echo Text::right('Some text here', 4);

Extract the first $num characters from a string., (*16)

echo Text::left('Some text here', 4);

Replaces newline with <br> or <br />., (*17)

echo Text::nl2br("Some \n text \n here");

Replaces <br> and <br /> with newline., (*18)

echo Text::br2nl("Some <br /> text <br /> here");

Converts & to &., (*19)

echo Text::ampEncode("M&CMS");

Converts & to &., (*20)

echo Text::ampDecode("M&amp;CMS");

Convert plain text to html, (*21)

echo Text::toHtml('test');

Create safe string. Use to create safe usernames or filenames., (*22)

$safe_string = Text::safeString('hello world');

Encrypt string, (*23)

$encrypt_string = Text::encryptString('password', 'string_salt');

License

See LICENSE, (*24)

The Versions

17/07 2018

dev-master

9999999-dev https://github.com/flextype-components/text

Text component is a set of methods to help with the manipulation of strings.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

text string

17/07 2018

v1.1.1

1.1.1.0 https://github.com/flextype-components/text

Text component is a set of methods to help with the manipulation of strings.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

text string

30/06 2018

v1.1.0

1.1.0.0 https://github.com/flextype-components/text

Text component is a set of methods to help with the manipulation of strings.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

text string

26/04 2018

v1.0.2

1.0.2.0 https://github.com/flextype-components/text

Text component is a set of methods to help with the manipulation of strings.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

text string

26/04 2018

v1.0.1

1.0.1.0 https://github.com/flextype-components/text

Text component is a set of methods to help with the manipulation of strings.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

text string

19/04 2018

v1.0.0

1.0.0.0 https://github.com/flextype-components/text

Text component is a set of methods to help with the manipulation of strings.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

text string