定制 barouge/strings 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

barouge/strings

最新稳定版本:1.0.0

Composer 安装命令:

composer require barouge/strings

包简介

A library that extends PHP's native string functionality

README 文档

README

Tests codecov Licence Badge Release Badge Tag Badge Issues Badge Code Size

A library that extends PHP's native string functionality

Compatibility and dependencies

This library is compatible with PHP version 8.2.

This library has no dependencies.

Installation

Installation is simple using composer.

composer require barogue/strings

Or simply add it to your composer.json file

{
    "require": {
        "barogue/strings": "^1.0"
    }
}

Contributing

This library follows PSR-1 & PSR-2 standards.

Unit Tests

Before pushing any changes, please ensure the unit tests are all passing.

If possible, feel free to improve coverage in a separate commit.

vendor/bin/phpunit --prepend autoload.php

Code sniffer

Before pushing, please ensure you have run the code sniffer. Only run it using the lowest support PHP version (7.2)

vendor/bin/php-cs-fixer fix

Static Analyses

Before pushing, please ensure you have run the static analyses tool.

vendor/bin/phan

Benchmarks

Before pushing, please ensure you have checked the benchmarks and ensured that your code has not introduced any slowdowns.

Feel free to speed up existing code, in a separate commit.

Feel free to add more benchmarks for greater coverage, in a separate commit.

vendor/bin/phpbench run --report=speed
vendor/bin/phpbench run --report=speed --output=markdown
vendor/bin/phpbench run --report=speed --filter=benchNetFromTax --iterations=50 --revs=50000

vendor/bin/phpbench xdebug:profile
vendor/bin/phpbench xdebug:profile --gui

Documentation

This library adds a number of array functions to extend PHP's native functionality

Below you can find links to the documentation for the new features.

Function Description
str_case_camel Converts a string to camelCase
str_case_kebab Converts a string to kebab-case
str_case_pascal Converts a string to PascalCase
str_case_sentence Converts a string to Sentence case
str_case_snake Converts a string to snake_case
str_case_title Converts a string to Title Case
str_cipher_caesar Transform a string by shifting each letter up or down the alphabet
str_cipher_caesar_reverse Reverse the effects of str_cipher_caesar
str_cipher_mono_alphabetic Transform a string by mapping each letter to another alphabet
str_contains Determine if a string contains another string
str_ends_with Determine if a string ends with another string
str_random Creates a string of random characters
str_slug Converts a string to a slug
str_starts_with Determine if a string starts with another string

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: mit
  • 更新时间: 2023-08-24