path.extension
path.extension
Function
Returns the path extension.
Syntax
path(text).extension()
Parameters
None.
Return value
| Type | Description |
|---|---|
| String | Extension; if there is no extension, an empty string is returned. |
Code Example
result = path('root/docs/index.md').extension() // Output: md print result
Notes
- The return value does not contain a period.