Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于首拼模式,自定义是否带空格。 #3

Closed
TxcA opened this issue Mar 10, 2020 · 2 comments
Closed

关于首拼模式,自定义是否带空格。 #3

TxcA opened this issue Mar 10, 2020 · 2 comments

Comments

@TxcA
Copy link

TxcA commented Mar 10, 2020

你好,感谢封装,用过几个拼音库,都在不断的学习和尝试换更新的库。
这里提个使用中遇到的问题,FIRST_LETTER首拼模式下,是否可以多传个参数,不自动加空格(或者多一个没空格的枚举)。
这边用来取中文后做模糊匹配,目前调用完toPinYin后,还得replaceAll(" ", "")一次。
感谢

@houbb
Copy link
Owner

houbb commented Mar 11, 2020

好的,本周内有时间加一个这个特性。

@TxcA TxcA closed this as completed Mar 11, 2020
@houbb
Copy link
Owner

houbb commented Mar 11, 2020

v0.1.2 已支持自定义连接符号。

final String text = "我爱中文";
Assert.assertEquals("wazw", PinyinHelper.toPinyin(text, PinyinStyleEnum.FIRST_LETTER, StringUtil.EMPTY));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants