ogma-extra-1.0.7: Ogma: Helper tool to interoperate between Copilot and other languages.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.String.Extra

Description

Auxiliary functions for working with values of type String.

Synopsis

Safe I/O

safeReadFile :: FilePath -> IO (Either String String) Source #

Safely read a file into a String, returning a Left error message if the file cannot be opened.

String sanitization

sanitizeLCIdentifier :: String -> String Source #

Remove extraneous characters from an identifier and make the starting character lowercase.

This function currently replaces hyphens with underscores.

sanitizeUCIdentifier :: String -> String Source #

Remove extraneous characters from an identifier and make the starting character uppercase.

This function currently replaces hyphens with underscores.