2017 © Pedro Peláez
 

library string-buffer

StringBuffer is a PHP class providing operations for string buffering

image

atk14/string-buffer

StringBuffer is a PHP class providing operations for string buffering

  • Wednesday, May 2, 2018
  • by yarri
  • Repository
  • 2 Watchers
  • 0 Stars
  • 466 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 10 % Grown

The README.md

StringBuffer

Build Status, (*1)

StringBuffer is a PHP class providing operations for efficient string buffering, (*2)

Basic usage

$sb = new StringBuffer();
$sb->addString("Hello World!\n");
$sb->addFile("path/to/file");
$length = $sb->getLength();
$sb->printOut();

Converting StringBuffer into a string:, (*3)

$string = (string)$sb;
// or
$string = "$sb";
// or
$string = $sb->toString();

Temporary buffer

You can use StringBuffer to store and manipulate large chunks of data without consuming excessive memory., (*4)

$buffer = new StringBufferTemporary();

// read something big in chunks
$buffer->add($megabyte);
$buffer->add($megabyte);
$buffer->add($megabyte);
$buffer->add($megabyte);
$buffer->add($megabyte);
// and so on... :)

$buffer->printOut();
// or
$buffer->writeToFile($target_filename);

Constant TEMP can be defined in order to specify the desired temporary directory for storing string buffer items., (*5)

define("TEMP","/path/to/temp/");

Installation

Use the Composer to install StringBuffer., (*6)

cd path/to/your/project/
composer require atk14/string-buffer

Licence

StringBuffer is free software distributed under the terms of the MIT license, (*7)

The Versions

02/05 2018

dev-master

9999999-dev https://github.com/atk14/StringBuffer

StringBuffer is a PHP class providing operations for string buffering

  Sources   Download

MIT

The Requires

 

The Development Requires

strings string buffer buffering

24/01 2017

v1.0

1.0.0.0 https://github.com/atk14/StringBuffer

StringBuffer is a PHP class providing operations for string buffering

  Sources   Download

MIT

The Requires

 

strings string buffer buffering