version 0.7.2
This commit is contained in:
parent
2cd136cf7a
commit
ddaedab835
158 changed files with 34811 additions and 10001 deletions
|
|
@ -1062,14 +1062,14 @@ proc cmpPaths(pathA, pathB: string): int =
|
|||
result = cmpIgnoreCase(pathA, pathB)
|
||||
|
||||
proc extractDir(path: string): string =
|
||||
if path[path.len-1] in {dirSep, altSep}:
|
||||
if path.len == 0 or path[path.len-1] in {dirSep, altSep}:
|
||||
result = path
|
||||
else:
|
||||
var tail: string
|
||||
splitPath(path, result, tail)
|
||||
|
||||
proc extractFilename(path: string): string =
|
||||
if path[path.len-1] in {dirSep, altSep}:
|
||||
if path.len == 0 or path[path.len-1] in {dirSep, altSep}:
|
||||
result = ""
|
||||
else:
|
||||
var head: string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue