定制 weew/helpers-string 二次开发

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

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

weew/helpers-string

Composer 安装命令:

composer require weew/helpers-string

包简介

Collection of useful php string helpers.

README 文档

README

Build Status Test Coverage Version Licence

Table of contents

Installation

composer install weew/helpers-string

Introduction

This tiny library provides various helper functions to deal with common string manipulation related problems.

Functions

s

Simple helper to format strings. Supports placeholders like :key and %s.

string s(string $format, mixed $args [, mixed $...])

str_starts_with

Check if a string starts with the given sequence.

bool str_starts_with(string $string, string $search [, bool $caseSensitive = false])

str_ends_with

heck if a string ends with the given sequence.

bool str_ends_with(string $string, string $search [, bool $caseSensitive = false])

url

Combine multiple strings to a url. This function makes sure the pieces are properly glued together with a / and eliminates all //, except after the protocol.

string url(string $paths [, $...])

path

Combine multiple strings to a path. Glues pieces together with the proper directory separator and eliminates all // or \\.

string path(string $paths [, $...])

get_type

Get type of a value. Returns values like int, string, function. Objects will return its class name.

string get_type(mixed $abstract)

str_snake_case

Convert string to snake_case.

string str_snake_case(string $string)

str_studly_caps

Convert string to StudlyCase.

string str_studly_caps(string $string [, array $delimiters = ['-', '_']])

str_camel_case

Convert a string to camelCase.

string str_camel_case(string $string [, array $delimiters = ['-', '_']])

str_random

Generate a random alphanumeric string. Works only with even numbers.

string str_random([int $length = 10])

str_explode

Split a string by one or multiple delimiters. Works the same way as the explode function, but allows several delimiters.

string str_explode(string $string, string|array $delimiter [, int $limit = PHP_INT_MAX])

uuid

Generate a v4 uuid.

string uuid([string $prefix = null, int $length = 36])

uuid_format

Format string as a v4 uuid.

string uuid_format(string $string [, string $prefix = null, int $length = null])

simple_uuid

Generate a uuid of a simpler format.

string simple_uuid()

format_xml

Format an xml string.

string format_xml($string)

weew/helpers-string 适用场景与选型建议

weew/helpers-string 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 161.45k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2016 年 07 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 weew/helpers-string 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 weew/helpers-string 我们能提供哪些服务?
定制开发 / 二次开发

基于 weew/helpers-string 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-16