Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #78 from nodes-vapor/MartinLasek-patch-1
Browse files Browse the repository at this point in the history
initialize non-optional Bool from String
  • Loading branch information
martinlasek authored Sep 6, 2018
2 parents 14f9582 + 634fdb3 commit ef838e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/Sugar/Helpers/Bool.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extension Bool {
init(from string: String) {
self = ["1", "true"].contains(string.lowercased())
}
}

0 comments on commit ef838e2

Please sign in to comment.