File: extension.md

package info (click to toggle)
bnd 5.0.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 44,128 kB
  • sloc: java: 249,039; xml: 90,728; sh: 655; perl: 153; makefile: 96; python: 47; javascript: 9
file content (18 lines) | stat: -rw-r--r-- 591 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
layout: default
class: Macro
title: extension ';' PATH
summary: The file extension of the given path or empty string if no extension
---

Returns the file extension of the specified path. The last segment of the path is examined for a `.` separating the extension from the rest of the file name. The extension is returned or, if the file name has no extension, an empty string is returned.

## Examples

    # returns 'def'
    ${extension;abcdef.def}
    ${extension;/foo.bar/abcdefxyz.def}
    
    # Returns empty string
    ${extension;abcdefxyz}
    ${extension;/foo.bar/abcdefxyz}