Share via


replace_extension Function

Replaces the file name extension of the specified file name.

template<class Path>
inline Path replace_extension(
   const Path& Pval,
   const typename Path::string_type& Newext
);

Parameters

  • Pval
    A Path object. Path can be either a basic_path or a type that's derived from basic_path.

  • Newext
    The new extension.

Return Value

A copy of Pval that contains the new extension.

Requirements

Header: filesystem

Namespace: std::tr2::sys

See Also

Reference

<filesystem>

Other Resources

Header Files