nabeghe/stringer 问题修复 & 功能扩展

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

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

nabeghe/stringer

最新稳定版本:v1.1.4

Composer 安装命令:

composer require nabeghe/stringer

包简介

A string helper for PHP. It includes some useful methods and possibly other features.

README 文档

README

A string helper for PHP. It includes some useful methods and possibly other features.

Some of the methods from the Str class of the Laravel framework are also included in this library; however, some of them have been modified.

🫡 Usage

🚀 Installation

You can install the package via composer:

composer require nabeghe/stringer

Str Class

The main class that includes the useful methods is Nabegh\String\Str.

Example:

use Nabeghe\Stringer\Str;

echo Str::random(32);
echo Str::random(32, '0123456789');

UnicodeControls Class

A class that includes some Unicode control characters; for example, the invisible character, or the right-to-left and left-to-right markers.

use Nabeghe\Stringer\UnicodeControls;

echo UnicodeControls::ISS; // Invisible

Stringer Class

A string class.

Accepts any value, converts it to a string via strval, stores it, and returns it via __toString.

It is possible to access the methods of the Str class through the Stringer object as well, with the difference that the main text parameter is no longer present.

use Nabeghe\Stringer\Stringer;

$string = new Stringer('In programming, a string is a sequence of characters, and string manipulation processes these characters.');
echo $string->after('string ')->before(','); // `is a sequence of characters`

📖 License

Licensed under the MIT license, see LICENSE.md for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-16