Skip to content

Instantly share code, notes, and snippets.

@alimir1
Last active August 2, 2023 19:06

Revisions

  1. alimir1 renamed this gist Jan 8, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. alimir1 created this gist Jan 8, 2017.
    9 changes: 9 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    func isPalindrome(_ word: String) -> Bool {
    let word = word.lowercased().characters.filter{ $0 != " " }
    for (i, character) in word.enumerated() {
    if character != word[word.count-i-1] {
    return false
    }
    }
    return true
    }