mirror of https://github.com/exaloop/codon.git
stdlib/os/path.codon
parent
808e932685
commit
928d2a0c56
stdlib/os
|
@ -1,10 +1,13 @@
|
|||
# (c) 2022 Exaloop Inc. All rights reserved.
|
||||
|
||||
|
||||
def splitext(p: str) -> Tuple[str, str]:
|
||||
"""
|
||||
Split the extension from a pathname.
|
||||
Extension is everything from the last dot to the end, ignoring
|
||||
leading dots. Returns "(root, ext)"; ext may be empty."""
|
||||
sep = '/'
|
||||
extsep = '.'
|
||||
sep = "/"
|
||||
extsep = "."
|
||||
|
||||
sepIndex = p.rfind(sep)
|
||||
dotIndex = p.rfind(extsep)
|
||||
|
|
Loading…
Reference in New Issue