idris-0.9.18: libs/contrib/Data/String.idr
module Data.String
infixl 5 +>
infixr 5 <+
||| Adds a character to the end of the specified string.
|||
||| ```idris example
||| strSnoc "AB" 'C'
||| ```
||| ```idris example
||| strSnoc "" 'A'
||| ```
strSnoc : String -> Char -> String
strSnoc s c = s ++ (singleton c)
||| Alias of `strSnoc`
|||
||| ```idris example
||| "AB" +> 'C'
||| ```
(+>) : String -> Char -> String
(+>) = strSnoc
||| Alias of `strCons`
|||
||| ```idris example
||| 'A' <+ "AB"
||| ```
(<+) : Char -> String -> String
(<+) = strCons