Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hongxinhope committed Sep 26, 2017
1 parent 43b727b commit 6279f53
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions HanziPinyin/PinyinFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ internal struct PinyinFormatter {
}

switch format.caseType {
case .lowercase:
case .lowercased:
formattedPinyin = formattedPinyin.lowercased()
case .uppercase:
case .uppercased:
formattedPinyin = formattedPinyin.uppercased()
case .capitalized:
formattedPinyin = formattedPinyin.capitalized
Expand Down
6 changes: 3 additions & 3 deletions HanziPinyin/PinyinOutputFormat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public enum PinyinVCharType {
}

public enum PinyinCaseType {
case lowercase
case uppercase
case lowercased
case uppercased
case capitalized
}

Expand All @@ -31,7 +31,7 @@ public struct PinyinOutputFormat {
public var caseType: PinyinCaseType

public static var `default`: PinyinOutputFormat {
return PinyinOutputFormat(toneType: .none, vCharType: .vCharacter, caseType: .lowercase)
return PinyinOutputFormat(toneType: .none, vCharType: .vCharacter, caseType: .lowercased)
}

public init(toneType: PinyinToneType, vCharType: PinyinVCharType, caseType: PinyinCaseType) {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ github "teambition/HanziPinyin"
```swift
// PinyinToneType: none, toneNumber
// PinyinVCharType: vCharacter, uUnicode, uAndColon
// PinyinCaseType: lowercase, uppercase
let outputFormat = PinyinOutputFormat(toneType: .none, vCharType: .vCharacter, caseType: .lowercase)
// PinyinCaseType: lowercased, uppercased, capitalized
let outputFormat = PinyinOutputFormat(toneType: .none, vCharType: .vCharacter, caseType: .lowercased)
```
#### Convert to Pinyin synchronously
```swift
Expand Down

0 comments on commit 6279f53

Please sign in to comment.