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 364 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().