Copyright(c) Andrew Ray, 2017
LicenseMIT
Safe HaskellSafe

Util

Description

Utility functions for Yasgheld.

Synopsis

Documentation

strip

Arguments

:: String

Input String

-> String

Output String, whitespace removed

Strips leading and trailing whitespace from the given String.

replace

Arguments

:: Eq a 
=> [a]

The search value

-> [a]

The replace value

-> [a]

The string to search in

-> [a]

The string, after substitutions

Performs substitution on a string

removeComment

Arguments

:: String

String to remove comments from

-> String

String with comments removed

Removes comments from strings

(??) infixl 9

Arguments

:: Eq a 
=> [(a, b, c)]

The list of three-tuples to search in

-> a

The first term to search for

-> Maybe b

Just the second term, or Nothing if no matches

Finds the second term referenced by the first given term

(?) infixl 9

Arguments

:: Eq a 
=> [(a, b, c)]

The list of three-tuples to search in

-> a

The first term to search for

-> Maybe (b, c)

Just the last two terms, or Nothing if no matches

Finds the list referenced by the given first term