agaric/oxford-comma
最新稳定版本:1.2.0
Composer 安装命令:
composer require agaric/oxford-comma
包简介
A function to take a list of terms and return them in an English phrase with proper punctuation 'red, black, and white' or 'red and black'.
README 文档
README
Usage
"We talked with his teachers, Oprah, and Barack Obama" not "We talked with his teachers, Oprah and Barack Obama".
"The dog ate carrots, grapes, and peanut butter and jelly sandwiches" not "The dog ate carrots, grapes and peanut butter and jelly sandwiches."
Usage of this library
Turn an array of strings into a natural-language list:
use Agaric\OxfordComma;
$array = ["State Fair", "South Pacific", "The King and I"];
$text = OxfordComma\oxford_comma_list($array); // State Fair, South Pacific, and The King and I
统计信息
- 总下载量: 12.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0-or-later
- 更新时间: 2019-09-26