PISM, A Parallel Ice Sheet Model 2.2.1-cd005eec8 committed by Constantine Khrulev on 2025-03-07
Loading...
Searching...
No Matches

◆ filename_add_suffix()

std::string pism::filename_add_suffix ( const std::string &  filename,
const std::string &  separator,
const std::string &  suffix 
)

Adds a suffix to a filename.

Returns filename + separator + suffix + .nc if the original filename had the .nc suffix, otherwise filename + separator. If the old filename had the form "name + separator + more stuff + .nc", then removes the string after the separator.

Definition at line 370 of file pism_utilities.cc.

References ends_with().

Referenced by pism::Geometry::ensure_consistency(), pism::IceModel::init_checkpoints(), and pism::IceModel::save_state_on_error().