2017 © Pedro Peláez
 

library mix-string

When unicode characters and ascii characters mixed, according to your needs, calculate the length of the string

image

shouding/mix-string

When unicode characters and ascii characters mixed, according to your needs, calculate the length of the string

  • Saturday, June 18, 2016
  • by xiangshouding
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Shouding\Mix\Str

Description

When unicode characters and ascii characters mixed, according to your needs, calculate the length of the string, (*1)

Example

need composer, (*2)

{
    "require": {
        "shouding/mix-string": "1.0.0"
    }
}
>>> require('vendor/autoload.php')
=> Composer\Autoload\ClassLoader {#162}
>>> use Shouding\Mix\Str;
=> null
>>> Str::length("this is a test 中国")
=> 6
>>> Str::length("this is a test 中国", Str::TYPE_CHAR)
=> 17
>>> Str::length("this is a test 中国", Str::TYPE_BYTES)
=> 21

The Versions

18/06 2016

dev-master

9999999-dev

When unicode characters and ascii characters mixed, according to your needs, calculate the length of the string

  Sources   Download

BSD

The Requires

 

by Avatar xiangshouding

18/06 2016

1.0.0

1.0.0.0

if unicode and alpha word mixd, can calculate length for your need

  Sources   Download

BSD

The Requires

 

by Avatar xiangshouding