Docs for basename #113

Merged
merged 1 commit into from May 24, 2017
Jump to file or symbol
Failed to load files and symbols.
+8 −0
Split
View
@@ -100,6 +100,7 @@
* [X select_first(Array\[X?\])](#x-select_firstarrayx)
* [Array\[X\] select_all(Array\[X?\])](#arrayx-select_allarrayx)
* [Boolean defined(X?)](#boolean-definedx)
+ * [String basename(String)](#string-basenamestring)
* [Data Types & Serialization](#data-types--serialization)
* [Serialization of Task Inputs](#serialization-of-task-inputs)
* [Primitive Types](#primitive-types)
@@ -2618,6 +2619,13 @@ Given an array of optional values, `select_all` will select only those elements
This function will return `false` if the argument is an unset optional value. It will return `true` in all other cases.
+## String basename(String)
+
+:pig2: [Supported in Cromwell 27](https://github.com/broadinstitute/cromwell#wdl-support) :white_check_mark:
+
+- This function returns the basename of a file path passed to it: `basename("/path/to/file.txt")` returns `"file.txt"`.
+- Also supports an optional parameter, suffix to remove: `basename("/path/to/file.txt", ".txt")` returns `"file"`.
+
# Data Types & Serialization
:pig2: [Cromwell supported](https://github.com/broadinstitute/cromwell#wdl-support) :white_check_mark: