Coder Social home page Coder Social logo

Comments (6)

overtrue avatar overtrue commented on August 21, 2024

OK,没问题,请稍等几日,最近忙于公司项目

在 2014年9月30日,下午5:03,李勋冠 [email protected] 写道:

Pinyin::trans('我们', array('delimiter' => '', 'first' => true));

输出 // wm


Reply to this email directly or view it on GitHub #1.

from pinyin.

overtrue avatar overtrue commented on August 21, 2024

@LiXunGuan 已经添加获取首字母方法:

include __DIR__ . '/src/Overtrue/Pinyin.php';

$str = "带着希望去旅行,比到达终点更美好";

$pingyin = new Overtrue\Pinyin;

echo $pingyin->firstLetter($str), "\n";
// D Z X W Q L X B D D Z D G M H

echo $pingyin->firstLetter($str, ''), "\n";
//DZXWQLXBDDZDGMH

echo $pingyin->firstLetter($str, '-'), "\n";
//D-Z-X-W-Q-L-X-B-D-D-Z-D-G-M-H

另外修改了一下调用方法, 请查看项目README。

from pinyin.

LiXunGuan avatar LiXunGuan commented on August 21, 2024

3Q,国庆期间还在coding

from pinyin.

overtrue avatar overtrue commented on August 21, 2024

哈哈

在 2014年10月3日,下午5:57,李勋冠 <[email protected] mailto:[email protected]> 写道:

3Q,国庆期间还在coding


Reply to this email directly or view it on GitHub #1 (comment).

from pinyin.

LiXunGuan avatar LiXunGuan commented on August 21, 2024

如果能搞成静态方法就更好了(PS laravel4用习惯了...强迫症)
Pinyin::firstLetter()
Pinyin::trans()

from pinyin.

overtrue avatar overtrue commented on August 21, 2024

@ok。稍等

from pinyin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.