Initial import
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#lang racket/base
|
||||
|
||||
(require racket/format
|
||||
racket/path
|
||||
racket/string)
|
||||
|
||||
(provide path->rash-string)
|
||||
|
||||
(define (path->rash-string path)
|
||||
(define text
|
||||
(cond
|
||||
[(path? path) (path->string path)]
|
||||
[(string? path) path]
|
||||
[else (path->string (string->path (~a path)))]))
|
||||
(if (eq? (system-type 'os) 'windows)
|
||||
(string-replace text "\\" "/")
|
||||
text))
|
||||
Reference in New Issue
Block a user