winpath

function winpath( path ) --> wpath

Description

Converts a path to the windows style version.

Parameters

path

A unix or windows style path.

Return Values

wpath

A windows style version of the path.

Code

--ZFUNC-winpath-v1
local function winpath( path ) --> wpath
   return path:gsub( "/", "\\" )
end

return winpath

Examples

local t = require( "taptest" )
local winpath = require( "winpath" )

t( winpath( "C:/a/b/c" ), [[C:\a\b\c]] )

t()

See also