Skip to content

Commit

Permalink
Merge pull request #15 from unsignedapps/bug/vexillographer-digit-dis…
Browse files Browse the repository at this point in the history
…play-names

Fixed display of digits in Vexillographer property display names
  • Loading branch information
bok- authored Jul 13, 2020
2 parents 3102594 + 386eeb5 commit 3de5c1c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ extension String {
var wordStart = string.startIndex
var searchRange = string.index(after: wordStart)..<string.endIndex

let uppercase = CharacterSet.uppercaseLetters.union(CharacterSet.decimalDigits)

// Find next uppercase character
while let upperCaseRange = string.rangeOfCharacter(from: CharacterSet.uppercaseLetters, options: [], range: searchRange) {
while let upperCaseRange = string.rangeOfCharacter(from: uppercase, options: [], range: searchRange) {
let untilUpperCase = wordStart..<upperCaseRange.lowerBound
words.append(untilUpperCase)

Expand Down

0 comments on commit 3de5c1c

Please sign in to comment.