tagsoup-selection-0.1.0.1: Selecting subtrees from TagSoup's TagTrees using CSS selectors

Safe HaskellSafe
LanguageHaskell98

Text.StringLike.Matchable

Synopsis

Documentation

class StringLike str => Matchable str where Source #

An extention of string-like types for sub-string matching at various postions.

Methods

matchesExactly :: str -> str -> Bool Source #

Checks if two strings match exactly. This should by equal to '(==)' for most types.

matchesPrefixOf :: str -> str -> Bool Source #

Checks if the first string is a prefix of of the second. If the first string is empty, the result is always False.

matchesInfixOf :: str -> str -> Bool Source #

Checks if the first string is an infix of the second, i.e. if the first string appears somewhere in the second. If the first string is empty, the result is always False.

matchesSuffixOf :: str -> str -> Bool Source #

Checks if the first string is a suffix of the second. If the first string is empty, the result is always False.

matchesWordOf :: str -> str -> Bool Source #

Checks if the first string matches any of the whitespace-separated substrings in the second string exactly. If the first string is empty, the result is always False.

checkNull :: (s -> Bool) -> (s -> s -> Bool) -> s -> s -> Bool Source #

checkNull null comp s1 s2 returns False if either null s1 == True or comp s1 s2 == False, and returns True otherwise.