承接 alcamo/input-stream 相关项目开发

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

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

alcamo/input-stream

最新稳定版本:0.4.7

Composer 安装命令:

composer require alcamo/input-stream

包简介

Input stream vaguely inspired by C++ istream

README 文档

README

<?php

use alcamo\input_stream\StringInputStream;

include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';

$text = <<<EOT
foo=bar ; example assignment

EOT;

$stream = new StringInputStream($text);

echo "Left: " . $stream->extractUntil('=') . PHP_EOL;

echo "Equal sign: " . $stream->extract() . PHP_EOL;

echo "Right: " . $stream->extractRegexp('/[a-z]+/') . PHP_EOL;

echo "Comment: " . $stream->extractWsAndComments() . PHP_EOL;

This example is contained in this package as a file in the bin directory. It will output

Left: foo
Equal sign: =
Right: bar
Comment:  ; example assignment

Overview

This package provides input streams vaguely inspired by C++ istream. In addition to C++-like methods such as extract(), isGood(), peek(), putback(), they provide convenenience methods such as extractUntil() or extractRegexp().

The class StringInputStream is for strings where one byte corresponds to one character, auch as ASCII or ISO-8859, while MbStringInputStream supports multibyte character sets such as UTF-8. The former should be preferred if applicable because it is faster.

See the doxygen documentation for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2021-06-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固