public string TestWithToneNumber( char ch, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType) { HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); format.ToneType = HanyuPinyinToneType.WITH_TONE_NUMBER; format.VCharType = vcharType; format.CaseType = caseType; return(PinyinHelper.ToHanyuPinyinStringArray(ch, format)[0]); }
public string[] TestCharWithMultiplePronouciations( char ch, HanyuPinyinToneType toneType, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType) { HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); format.ToneType = toneType; format.VCharType = vcharType; format.CaseType = caseType; return(PinyinHelper.ToHanyuPinyinStringArray(ch, format)); }
public string TestWithToneNumber( char ch, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType) { var format = new HanyuPinyinOutputFormat { ToneType = HanyuPinyinToneType.WithToneNumber, VCharType = vcharType, CaseType = caseType }; return(PinyinHelper.ToHanyuPinyinStringArray(ch, format) [0]); }
public void TestWithToneNumber(char ch, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType, string result) { var format = new HanyuPinyinOutputFormat { ToneType = HanyuPinyinToneType.WITH_TONE_NUMBER, VCharType = vcharType, CaseType = caseType }; Assert.Equal(result, PinyinHelper.ToHanyuPinyinStringArray(ch, format)[0]); }
public string[] TestCharWithMultiplePronunciations( char ch, HanyuPinyinToneType toneType, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType) { var format = new HanyuPinyinOutputFormat { ToneType = toneType, VCharType = vcharType, CaseType = caseType }; return(PinyinHelper.ToHanyuPinyinStringArray(ch, format)); }
public void TestCharWithMultiplePronouciations( char ch, HanyuPinyinToneType toneType, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType, string[] result) { var format = new HanyuPinyinOutputFormat { ToneType = toneType, VCharType = vcharType, CaseType = caseType }; Assert.True(Enumerable.SequenceEqual(result, PinyinHelper.ToHanyuPinyinStringArray(ch, format))); }
/// <summary> /// Restore default variable values for this class /// 重新加载本类的默认变量值 /// /// Default values are listed below: /// 默认变量值如下 /// <p> /// HanyuPinyinVCharType := WITH_U_AND_COLON <br /> /// HanyuPinyinCaseType := LOWERCASE <br/> /// HanyuPinyinToneType := WITH_TONE_NUMBER <br/> /// </p> /// </summary> public void RestoreDefault() { vCharType = HanyuPinyinVCharType.WITH_U_AND_COLON; caseType = HanyuPinyinCaseType.LOWERCASE; toneType = HanyuPinyinToneType.WITH_TONE_NUMBER; }
/** * Define the output cases of Hanyu Pinyin characters * * @param caseType * the output cases of Hanyu Pinyin characters * * @see HanyuPinyinCaseType */ public void setCaseType(HanyuPinyinCaseType caseType) { this.caseType = caseType; }
/** * Restore default variable values for this class * * Default values are listed below: * * <p> * HanyuPinyinVCharType := WITH_U_AND_COLON <br> * HanyuPinyinCaseType := LOWERCASE <br> * HanyuPinyinToneType := WITH_TONE_NUMBER <br> */ public void restoreDefault() { vCharType = HanyuPinyinVCharType.WITH_U_AND_COLON; caseType = HanyuPinyinCaseType.LOWERCASE; toneType = HanyuPinyinToneType.WITH_TONE_NUMBER; }
public string[] TestCharWithMultiplePronouciations( char ch, HanyuPinyinToneType toneType, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType) { HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); format.ToneType = toneType; format.VCharType = vcharType; format.CaseType = caseType; return PinyinHelper.ToHanyuPinyinStringArray(ch, format); }
public string TestWithToneNumber( char ch, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType) { HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); format.ToneType = HanyuPinyinToneType.WITH_TONE_NUMBER; format.VCharType = vcharType; format.CaseType = caseType; return PinyinHelper.ToHanyuPinyinStringArray(ch, format)[0]; }