Utils.hs: function to chomp prefix + separator from a string
authorDato Simó <dato@google.com>
Wed, 10 Oct 2012 20:08:03 +0000 (21:08 +0100)
committerDato Simó <dato@google.com>
Mon, 14 Jan 2013 15:54:44 +0000 (15:54 +0000)
commitb009f682436e77655ec120aeb2b11817fb453a43
tree8804080ec8cecceb13d4610966388cceeb5bb338
parentb6aeda4a504d80e1c91cd64316441a160d073df2
Utils.hs: function to chomp prefix + separator from a string

Some auto-repair tags are composed of a prefix and then an optional
argument; the new "chompPrefix" function in Utils.hs allows to strip a
prefix, allowing the last character (the separator) to be absent if there
is no argument.

Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
src/Ganeti/Utils.hs
test/hs/Test/Ganeti/Utils.hs