承接 atk14/string-buffer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

atk14/string-buffer

最新稳定版本:v1.2.4

Composer 安装命令:

composer require atk14/string-buffer

包简介

StringBuffer is a PHP class providing operations for efficient string buffering

README 文档

README

Build Status

StringBuffer is a PHP class providing operations for efficient string buffering

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:

$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.

$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.

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

Installation

Use the Composer to install StringBuffer.

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

Licence

StringBuffer is free software distributed under the terms of the MIT license

统计信息

  • 总下载量: 27.82k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-24