Download the PHP package mucts/string without Composer

On this page you can find all versions of the php package mucts/string. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package string

Build Status Code Intelligence Status Scrutinizer Code Quality Total Downloads Latest Stable Version License

Str 字符串

Str类提供一个便捷的操作字符串的封装。

使用

将给定字符串「蛇式」转化为 camelCase「驼峰式」

函数判断指定的字符串是否以给定的值结尾

将给定的「驼峰式」字符串转化为kebab-case「短横式」字符串

Str::snake 函数将给定的字符串转换为 snake_case「蛇式」

Str::startsWith 函数判断给定的字符串的开头是否是指定值

Str::after 函数返回在字符串中指定值之后的所有内容

Str::before 函数返回在字符串中指定值之前的所有内容

Str::contains 函数判断给定的字符串是否包含给定的值(区分大小写)

Str::finish 函数将给定的字符串以给定的值结尾返回(如果它尚未以给定值结尾)

Str::is 函数判断给定的字符串是否匹配给定的模式。星号 * 可以用来表示通配符

Str::limit 函数按给定的长度截断给定的字符串

你也可以传递第三个参数来改变将被追加到最后的字符串:

Str::orderedUuid 方法高效生成一个可存储在索引数据库列中的「第一时间」 UUID

Str::plural 函数将字符串转换为复数形式。该函数目前仅支持英文

你可以提供一个整数作为函数的第二个参数来检索字符串的单数或复数形式

Str::random 函数生成一个指定长度的随机字符串。这个函数用 PHPrandom_bytes 函数

Str::replaceArray 函数使用数组顺序替换字符串中的给定值

Str::replaceFirst 函数替换字符串中给定值的第一个匹配项

Str::replaceLast

Str::replaceLast 函数替换字符串中最后一次出现的给定值:

Str::singular 函数将字符串转换为单数形式。该函数目前仅支持英文

Str::slug 函数将给定的字符串生成一个 URL 友好的 「slug

Str::start 函数将给定值添加到给定字符串的开始位置(如果字符串尚未以给定值开始)

Str::studly 函数将给定的字符串转换为 「变种驼峰命名」

Str::title 函数将给定的字符串转换为「首字母大写」

Str::uuid 方法生成一个 UUID(版本 4)


All versions of string with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
ext-mbstring Version *
voku/portable-ascii Version ^1.5
mucts/macroable Version ^1.0
mucts/contracts Version ^1.0
mucts/collections Version ^1.0
doctrine/inflector Version ^2.0
ramsey/uuid Version ^4.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mucts/string contains the following files

Loading the files please wait ....