Revision 19e310cc htools/Ganeti/HTools/Utils.hs

b/htools/Ganeti/HTools/Utils.hs
34 34
  , tryRead
35 35
  , formatTable
36 36
  , parseUnit
37
  , plural
37 38
  ) where
38 39

  
39 40
import Data.Char (toUpper)
......
76 77
  where (x, xs) = break (== sep) s
77 78
        ys = drop 1 xs
78 79

  
80
-- | Simple pluralize helper
81
plural :: Int -> String -> String -> String
82
plural 1 s _ = s
83
plural _ _ p = p
84

  
79 85
-- * Mathematical functions
80 86

  
81 87
-- Simple and slow statistical functions, please replace with better

Also available in: Unified diff