std::experimental::filesystem::path::replace_extension (3) - Linux Manuals
std::experimental::filesystem::path::replace_extension: std::experimental::filesystem::path::replace_extension
NAME
std::experimental::filesystem::path::replace_extension - std::experimental::filesystem::path::replace_extension
Synopsis
path& replace_extension( const path& replacement = path() ); (1) (filesystem TS)
Replaces the extension with replacement or removes it when the default value of replacement is used.
Firstly, if this path has an extension(), it is removed.
Then, a dot character is appended if replacement is not empty or does not begin with a dot character.
Then replacement is appended to the path.
Parameters
replacement - the extension to replace with
Return value
*this
Exceptions
(none)
Example
// Run this code
Output:
See also
extension (public member function)
filename (public member function)
stem (public member function)
has_extension (public member function)