Code Monkey home page Code Monkey logo

lpinyin's People

Contributors

sky24n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lpinyin's Issues

Wrong pinyin when using Traditional characters

Example:

var testTrad = PinyinHelper.getPinyin('乾淨', format: PinyinFormat.WITH_TONE_MARK);
print(testTrad);
var testSimpl = PinyinHelper.getPinyin('干净', format: PinyinFormat.WITH_TONE_MARK);
print(testSimpl);

Output:

qián jìng
gān jìng

Convert failed when starting with '李'

demo:

import 'package:lpinyin/lpinyin.dart';

main() {
  print(PinyinHelper.getPinyin('李四',separator: ''));
  print(PinyinHelper.getPinyin('小李',separator: ''));
  print(PinyinHelper.getPinyin('王五',separator: ''));
}

output:

李si
xiaoli
wangwu

getShortPinyin报错

像 "a,b" 这种会报错,中间是英文逗号,我试了中文逗号,句号,英文句号等都可以,唯独英文逗号不行,这么什么问题?

The following RangeError was thrown while handling a gesture:
RangeError (index): Invalid value: Valid value range is empty: 0

When the exception was thrown, this was the stack:
#0 _StringBase.[] (dart:core-patch/string_patch.dart:252:55)
#1 PinyinHelper.getShortPinyin. (package:lpinyin/src/pinyin_helper.dart:51:21)

拼音少了最后一个字母

separator为""的情况下,拼音会少了最后一个字母

return (sb.toString().endsWith(separator)
? sb.toString().substring(0, sb.toString().length - 1)
: sb.toString());

flutter can't import lpinyin.dart

flutter can't import lpinyin.dart,error as below:

Try correcting the name to the name of an existing getter, or defining a getter or field named 'PinyinHelper'.
String pinyin = PinyinHelper.getPinyinE(user.userName);
^^^^^^^^^^^^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Alpinyin%2Flpinyin.dart; message=StandardFileSystem only supports file:*
and data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)

#1 asFileUri (package:vm/kernel_front_end.dart:601:37)

#2
FrontendCompiler._outputDependenciesDelta (package:vm/frontend_server.dart:401:39)

#3 FrontendCompiler.compile (package:vm/frontend_server.dart:375:
13)

#4 _FlutterFrontendCompiler.compile (package:frontend_ser
ver/server.dart:31:22)

#5 starter (package:frontend_server/s
erver.dart:128:27)

#6 main (file:///C:/b/s/w/ir/k/src/flutter/frontend_ser
ver/bin/starter.dart:8:30)

#7 _startIsolate. (
dart:isolate-patch/isolate_patch.dart:299:32)
#8 _RawReceivePortImpl._handleMessage (dart:i
solate-patch/isolate_patch.dart:172:12)

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.