* @brief Finds the last occurrence of the specified suffix and removes * everything from its start to the end. * * @param[out] n Reference to string. * @param[in] suffix Suffix to find and remove. */
| 1110 | * @param[in] suffix Suffix to find and remove. |
| 1111 | */ |
| 1112 | void removeSuffix(std::string &n, const std::string &suffix) { |
| 1113 | std::size_t found = n.rfind(suffix); |
| 1114 | if (found != std::string::npos) { |
| 1115 | n = n.substr(0, found); |
| 1116 | } |
| 1117 | } |
| 1118 | |
| 1119 | /** |
| 1120 | * @brief Finds the last occurrence of the specified suffix and removes |
no outgoing calls