diff options
| author | Jouke Witteveen <j.witteveen@gmail.com> | 2025-07-14 16:12:30 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-07-24 16:04:48 +0300 |
| commit | 277d7268be5c730823ddac0cacd651c826043918 (patch) | |
| tree | 94ad1c0f23acf7b72ee1bec63e1ed1c670044abb /docs/markdown/Fs-module.md | |
| parent | 884fb4eefcfdb17a8434ac4a32600e120021641a (diff) | |
| download | meson-277d7268be5c730823ddac0cacd651c826043918.tar.gz | |
Add suffix function to the fs module
Diffstat (limited to 'docs/markdown/Fs-module.md')
| -rw-r--r-- | docs/markdown/Fs-module.md | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/docs/markdown/Fs-module.md b/docs/markdown/Fs-module.md index 7ba4832a0..91c706eb9 100644 --- a/docs/markdown/Fs-module.md +++ b/docs/markdown/Fs-module.md @@ -206,13 +206,26 @@ fs.name('foo/bar/baz.dll.a') # baz.dll.a *since 0.54.0* Returns the last component of the path, dropping the last part of the -suffix +suffix. ```meson fs.stem('foo/bar/baz.dll') # baz fs.stem('foo/bar/baz.dll.a') # baz.dll ``` +### suffix + +*since 1.9.0* + +Returns the last dot-separated portion of the final component of the path +including the dot, if any. + +```meson +fs.suffix('foo/bar/baz.dll') # .dll +fs.suffix('foo/bar/baz.dll.a') # .a +fs.suffix('foo/bar') # (empty) +``` + ### read - `read(path, encoding: 'utf-8')` *(since 0.57.0)*: return a [string](Syntax.md#strings) with the contents of the given `path`. |
