Ord a => [a] -> [a] -base -network -quickcheck
O(n) The transpose function transposes the rows and columns of its Text argument. Note that this function uses pack, unpack, and the list version of transpose, and is thus not very efficient.
Processing Strings into Html friendly things.
Simplifies the input string by interpreting \r and \b characters specially so that the result string has the same final (or terminal, pun intended) appearance as would the input string when written to a terminal that overwrites character positions following carriage returns and backspaces.
Converts a single value from the application/x-www-form-urlencoded encoding.
Converts a single value to the application/x-www-form-urlencoded encoding.
Add a trailing file path separator if one is not already present.
> hasTrailingPathSeparator (addTrailingPathSeparator x)
> hasTrailingPathSeparator x ==> addTrailingPathSeparator x == x
> Posix: addTrailingPathSeparator "test/rest" == "test/rest/"
Delete the drive, if it exists.
> dropDrive x == snd (splitDrive x)
Remove last extension, and the "." preceding it.
> dropExtension x == fst (splitExtension x)
Drop all extensions
> not $ hasExtension (dropExtensions x)
Drop the filename.
> dropFileName x == fst (splitFileName x)
Remove any trailing path separators
> dropTrailingPathSeparator "file/test/" == "file/test"
> Posix: not (hasTrailingPathSeparator (dropTrailingPathSeparator x)) || isDrive x
> Posix: dropTrailingPathSeparator "/" == "/"
> Windows: dropTrailingPathSeparator "\\" == "\\"
Take a FilePath and make it valid; does not change already valid FilePaths.
> isValid (makeValid x)
> isValid x ==> makeValid x == x
> makeValid "" == "_"
> Windows: makeValid "c:\\test:of_test" == "c:\\test_of_test"
> Windows: makeValid "test*" == "test_"
> Windows: makeValid "c:\\test\\nul" == "c:\\test\\nul_"
> Windows: makeValid "c:\\test\\prn.txt" == "c:\\test\\prn_.txt"
> Windows: makeValid "c:\\test/prn.txt" == "c:\\test/prn_.txt"
> Windows: makeValid "c:\\nul\\file" == "c:\\nul_\\file"
Normalise a file
* // outside of the drive can be made blank
* / -> pathSeparator
* ./ -> ""
> Posix: normalise "/file/\\test////" == "/file/\\test/"
> Posix: normalise "/file/./test" == "/file/test"
> Posix: normalise "/test/file/../bob/fred/" == "/test/file/../bob/fred/"
> Posix: normalise "../bob/fred/" == "../bob/fred/"
> Posix: normalise "./bob/fred/" == "bob/fred/"
> Windows: normalise "c:\\file/bob\\" == "C:\\file\\bob\\"
> Windows: normalise "c:\\" == "C:\\"
> Windows: normalise "\\\\server\\test" == "\\\\server\\test"
> Windows: normalise "c:/file" == "C:\\file"
> normalise "." == "."
> Posix: normalise "./" == "./"
> Posix: normalise "./." == "./"
> Posix: normalise "/" == "/"
> Posix: normalise "bob/fred/." == "bob/fred/"
Get the directory name, move up one level.
> takeDirectory x `isPrefixOf` x || takeDirectory x == "."
> takeDirectory "foo" == "."
> takeDirectory "/foo/bar/baz" == "/foo/bar"
> takeDirectory "/foo/bar/baz/" == "/foo/bar/baz"
> takeDirectory "foo/bar/baz" == "foo/bar"
> Windows: takeDirectory "foo\\bar" == "foo"
> Windows: takeDirectory "foo\\bar\\\\" == "foo\\bar"
> Windows: takeDirectory "C:\\" == "C:\\"
Get the drive from a filepath.
> takeDrive x == fst (splitDrive x)
Show more results