replace_extension功能

替换为指定的文件名的文件扩展名。

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

参数

  • Pval
    Path 对象。Path 可以是 basic_path 或从 basic_path派生类型。

  • Newext
    新的扩展。

返回值

包含新扩展 Pval 的副本。

要求

**标头:**文件系统

**命名空间:**std::tr2::sys

请参见

参考

<filesystem>

其他资源

标头文件