asm89/plusminus-parser
Composer 安装命令:
composer require asm89/plusminus-parser
包简介
Parses ++ and -- messages from strings
README 文档
README
A small library to parse ++ and -- messages. For example:
asm89 | qbot++
qbot | current score for qbot: 1337
asm89 | [it handles spaces]++
qbot | current score for it handles spaces: 42
Installation
Run:
composer require asm89/plusminus-parser
or add it to your composer.json file.
Usage
Create a parser and pass it the matchers you want to use.
$parser = new Asm89\PlusMinus\MessageParser([ new Asm89\PlusMinus\WordMatcher(0), new Asm89\PlusMinus\BracketMatcher(1), // bracket items take priority ]): /** @return null|Item */ $item = $parser->parse($message); // item API $item->getValue(); $item->isMinus(); $item->isPlus();
统计信息
- 总下载量: 837
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-03-12