2017 © Pedro Peláez
 

library clear-string

string utility package for clearing special characters

image

try/clear-string

string utility package for clearing special characters

  • Friday, October 20, 2017
  • by troublete
  • Repository
  • 1 Watchers
  • 0 Stars
  • 73 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

clear-string

string utility package for clearing special characters, (*1)

Build Status, (*2)

Install

$ composer require try/clear-string

Usage

<?php
require_once '/path/to/autoload.php';

use TryPhp\stripControlCharacters;

$clearedString = stripControlCharacters("Some Special\nMultiline String"); 
echo $clearedString; // will output "Some Special Multiline String";

API

Functions

stripControlCharacters($contents)

Function to strip control characters from a string. The function will replace \n and \t with a simple whitespace and remove any other control character (\0, \a, \b, \v, \f,\r, \e). So it cleans up the output and allows a more precise text comparison., (*3)

Arguments
Argument Type Description
$contents string The string that will be cleared.

stripColorCharacters($contents)

Function to remove escape characters (\e) with following color code (e.g. \e[33m) from a string., (*4)

Arguments
Argument Type Description
$contents string The string that will be cleared.

License

GPL-2.0 © Willi Eßer, (*5)

The Versions

20/10 2017

dev-master

9999999-dev

string utility package for clearing special characters

  Sources   Download

GPL-2.0

by Willi Eßer

20/10 2017

1.0.0

1.0.0.0

string utility package for clearing special characters

  Sources   Download

GPL-2.0

by Willi Eßer

20/10 2017

1.0.0-beta

1.0.0.0-beta

string utility package for clearing special characters

  Sources   Download

GPL-2.0

by Willi Eßer