/** * @file sanitizers.hpp * @brief Normalizing a value into the shape the library stores it in * * @copyright Copyright (c) 2026 SILO GROUP LLC * @author Chris Punches * * Part of the Dark Horse Linux Package Manager (DPM) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ #pragma once #include namespace dpm_core { /** * @brief Appends a trailing slash when one is absent * * @param s The path to normalize * @return The path, ending in a slash unless it is empty */ std::string with_trailing_slash(std::string s); } // namespace dpm_core