rstrip, lstrip
This commit is contained in:
parent
1085d476f1
commit
ac307957e5
@ -77,7 +77,6 @@ showLedgerTransaction' elide t =
|
|||||||
showaccountname s = printf "%-34s" s
|
showaccountname s = printf "%-34s" s
|
||||||
showcomment s = if (length s) > 0 then " ; "++s else ""
|
showcomment s = if (length s) > 0 then " ; "++s else ""
|
||||||
showstatus p = if pstatus p then "* " else ""
|
showstatus p = if pstatus p then "* " else ""
|
||||||
rstrip = reverse . dropWhile (== ' ') . reverse
|
|
||||||
|
|
||||||
isLedgerTransactionBalanced :: LedgerTransaction -> Bool
|
isLedgerTransactionBalanced :: LedgerTransaction -> Bool
|
||||||
isLedgerTransactionBalanced (LedgerTransaction {ltpostings=ps}) =
|
isLedgerTransactionBalanced (LedgerTransaction {ltpostings=ps}) =
|
||||||
|
|||||||
@ -48,7 +48,10 @@ import Text.ParserCombinators.Parsec
|
|||||||
lowercase = map toLower
|
lowercase = map toLower
|
||||||
uppercase = map toUpper
|
uppercase = map toUpper
|
||||||
|
|
||||||
strip = dropws . reverse . dropws . reverse where dropws = dropWhile (`elem` " \t")
|
strip = lstrip . rstrip
|
||||||
|
lstrip = dropws
|
||||||
|
rstrip = reverse . dropws . reverse
|
||||||
|
dropws = dropWhile (`elem` " \t")
|
||||||
|
|
||||||
elideLeft width s =
|
elideLeft width s =
|
||||||
case length s > width of
|
case length s > width of
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user