Comments (6)
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.
@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.
3Q,国庆期间还在coding
from pinyin.
哈哈
在 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.
如果能搞成静态方法就更好了(PS laravel4用习惯了...强迫症)
Pinyin::firstLetter()
Pinyin::trans()
from pinyin.
@ok。稍等
from pinyin.
Related Issues (20)
- 提取首字母小bug HOT 2
- Laravel 命名空间方式无法使用 PINYIN_UNICODE
- 可以添加遇到不能翻译的特殊字符如➕ 等。保持原样输出 HOT 3
- 名字“乐慧英”,拼音是lehuiying,而不是yuehuiying HOT 3
- 读音有误的感觉 HOT 2
- 5.0 语法设计 HOT 10
- Error in data HOT 3
- 保留标点不生效 HOT 4
- 安装版本要求太高,能否兼容 php 7 HOT 1
- 关于 女 这个 拼音 HOT 5
- 如何转首拼或者全拼的字符串中如果是1111 四个数字开头的字符串会转换失败,报错信息和代码我放下面了 HOT 5
- 多音字句子中的"家长" HOT 22
- $pinyin = Pinyin::polyphones('你电脑电脑电脑什么的',Converter::TONE_STYLE_NUMBER); HOT 1
- 腾讯云自动检测会报警 HOT 2
- 腾讯管家报毒:\overtrue\pinyin\bin\build HOT 3
- 取首字母时,能否保留完整的英文 HOT 1
- 「仆区」应该读 pú ōu 而非 pú qū HOT 5
- 请问一下4.x 版本支持单字返回多音吗? HOT 1
- 曾字应该读作zeng HOT 4
- 一直用4.1版本 内存型 速度非常快 循环5000次 也就几秒 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinyin.