Skip to content

Commit b7bfc22

Browse files
committed
빈 단어 들어왔을때 처리 추가
1 parent f865f4e commit b7bfc22

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Sources/BrailleToKor/PunctuationFunc.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ func translateLastPunc(_ word: [Character]) -> [Character] {
9898
var resultWord = word
9999
let word_count = word.count
100100

101+
if word_count == 0 {
102+
return resultWord
103+
}
104+
101105
let lastWord = String(word[word_count-1])
102106
var front_word = " "
103107
var front_front_word = " "

0 commit comments

Comments
 (0)