Skip to content

Commit

Permalink
making isPalindrome(_:) public
Browse files Browse the repository at this point in the history
  • Loading branch information
flohei committed Oct 18, 2018
1 parent e9ed794 commit d3acedf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Foundation
- parameter str: The string to validate
- returns: `true` if string is plaindrome, `false` if string is not
*/
func isPalindrome(_ str: String) -> Bool {
public func isPalindrome(_ str: String) -> Bool {
let strippedString = str.replacingOccurrences(of: "\\W", with: "", options: .regularExpression, range: nil)
let length = strippedString.count

Expand Down

0 comments on commit d3acedf

Please sign in to comment.