mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: ext => file_ext
This commit is contained in:
@@ -617,7 +617,7 @@ fn print_c_errno() {
|
||||
println('errno=$e err=$se')
|
||||
}
|
||||
|
||||
pub fn ext(path string) string {
|
||||
pub fn file_ext(path string) string {
|
||||
pos := path.last_index('.') or {
|
||||
return ''
|
||||
}
|
||||
|
||||
@@ -296,8 +296,8 @@ fn test_is_executable_writable_readable() {
|
||||
}
|
||||
|
||||
fn test_ext() {
|
||||
assert os.ext('file.v') == '.v'
|
||||
assert os.ext('file') == ''
|
||||
assert os.file_ext('file.v') == '.v'
|
||||
assert os.file_ext('file') == ''
|
||||
}
|
||||
|
||||
fn test_is_abs() {
|
||||
|
||||
Reference in New Issue
Block a user