palindromes-0.2.2.1: Finding palindromes in strings

Portabilityportable
Stabilityexperimental
Maintainerjohan@jeuring.net
Safe HaskellSafe-Infered

Data.Algorithms.Palindromes.Palindromes

Description

 

Synopsis

Documentation

longestPalindrome :: (Eq a, Show a) => [a] -> StringSource

longestPalindrome returns the longest palindrome in a string.

longestPalindromes :: (Eq a, Show a) => Int -> [a] -> StringSource

longestPalindromes returns the longest palindrome around each position in a string. The integer argument is used to only show palindromes of length at least this integer.

lengthLongestPalindrome :: Eq a => [a] -> StringSource

lengthLongestPalindrome returns the length of the longest palindrome in a string.

lengthLongestPalindromes :: Eq a => [a] -> StringSource

lengthLongestPalindromes returns the lengths of the longest palindrome around each position in a string.

longestTextPalindrome :: String -> StringSource

longestTextPalindrome returns the longest text palindrome in a string, ignoring spacing, punctuation symbols, and case of letters.

longestTextPalindromes :: Int -> String -> StringSource

longestTextPalindromes returns the longest text palindrome around each position in a string. The integer argument is used to only show palindromes of length at least this integer.

longestWordPalindrome :: String -> StringSource

longestWordPalindrome returns the longest text palindrome preceded and followed by non-letter symbols (if any).

longestWordPalindromes :: Int -> String -> StringSource

longestWordPalindromes returns the longest word palindrome around each position in a string. The integer argument is used to only show palindromes of length at least this integer.

palindromesAroundCentres :: Eq a => Array Int a -> [Int]Source

palindromesAroundCentres is the central function of the module. It returns the list of lenghths of the longest palindrome around each position in a string.