Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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