We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 593a749 + b45781a commit 578be41Copy full SHA for 578be41
Sources/SQLite/Helpers.swift
@@ -54,12 +54,17 @@ extension Optional: _OptionalType {
54
let SQLITE_TRANSIENT = unsafeBitCast(-1, to: sqlite3_destructor_type.self)
55
56
extension String {
57
-
58
func quote(_ mark: Character = "\"") -> String {
59
- let escaped = reduce("") { string, character in
60
- string + (character == mark ? "\(mark)\(mark)" : "\(character)")
+ var quoted = ""
+ quoted.append(mark)
+ for character in self {
61
+ quoted.append(character)
62
+ if character == mark {
63
64
+ }
65
}
- return "\(mark)\(escaped)\(mark)"
66
67
+ return quoted
68
69
70
func join(_ expressions: [Expressible]) -> Expressible {
0 commit comments