phant/value 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

phant/value

最新稳定版本:0.2

Composer 安装命令:

composer require phant/value

包简介

Manage value easily

README 文档

README

Requirements

PHP >= 8.1

Install

composer require phant/value

Usages

use Phant\Value\Handler\Text;

$sentence = ' Yesterday they opened a new «café» ,  would you like to go there? ';

echo (new Text($sentence))->testBeginsWithVowel() ? 'yes' : 'no'; // "yes"

echo (new Text($sentence))->removeUselessSpaces(); // "Yesterday they opened a new «café» , would you like to go there?"

echo (new Text($sentence))->removeAccents(); // " Yesterday they opened a new «cafe» ,would you like to go there? "

echo (new Text($sentence))->useNonBreakingSpaces(); // "Yesterday they opened a new « café », would you like to go there ?"

echo (new Text($sentence))->makeTypographicSpaces(); // "Yesterday they opened a new « café », would you like to go there ?"

echo (new Text($sentence))->upperInitial(); // "Yesterday they opened a new «café» ,would you like to go there? "

echo (new Text($sentence))->lowerInitial(); // "yesterday they opened a new «café» ,would you like to go there? "

echo (new Text($sentence))->upper(); // " YESTERDAY THEY OPENED A NEW «CAFÉ» ,WOULD YOU LIKE TO GO THERE? "

echo (new Text($sentence))->lower(); // " yesterday they opened a new «café» ,would you like to go there? "

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-13