Skip to content
Open

fix #38

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Regex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class Regex {

public class func escapeStr(str: String) -> String {
let matches = RegexPatternRegex.matches(testStr: str)
var charArr = [Character](str.characters)
var charArr = [Character](str)
var strBuilder = [Character]()
var i = 0
for match in matches {
Expand Down
2 changes: 1 addition & 1 deletion Sources/String.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public extension String {
/// - parameter index: Index for which the character is returned
/// - returns: Character at index i
public subscript(index: Int) -> Character? {
if let char = Array(self.characters).get(index: index) {
if let char = Array(self).get(index: index) {
return char
}
return .none
Expand Down