| 291 | } |
| 292 | |
| 293 | static String removeLastPathSection (const String& url) |
| 294 | { |
| 295 | auto startOfPath = findStartOfPath (url); |
| 296 | auto lastSlash = url.lastIndexOfChar ('/'); |
| 297 | |
| 298 | if (lastSlash > startOfPath && lastSlash == url.length() - 1) |
| 299 | return removeLastPathSection (url.dropLastCharacters (1)); |
| 300 | |
| 301 | if (lastSlash < 0) |
| 302 | return url; |
| 303 | |
| 304 | return url.substring (0, std::max (startOfPath, lastSlash)); |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | void URL::addParameter (const String& name, const String& value) |
no test coverage detected