| 846 | } |
| 847 | |
| 848 | std::string Path::Combine(const std::string_view base, const std::string_view next) |
| 849 | { |
| 850 | std::string ret; |
| 851 | ret.reserve(base.length() + next.length() + 1); |
| 852 | |
| 853 | PathAppendString(ret, base); |
| 854 | while (!ret.empty() && ret.back() == FS_OSPATH_SEPARATOR_CHARACTER) |
| 855 | ret.pop_back(); |
| 856 | |
| 857 | ret += FS_OSPATH_SEPARATOR_CHARACTER; |
| 858 | PathAppendString(ret, next); |
| 859 | while (!ret.empty() && ret.back() == FS_OSPATH_SEPARATOR_CHARACTER) |
| 860 | ret.pop_back(); |
| 861 | |
| 862 | return ret; |
| 863 | } |
| 864 | |
| 865 | |
| 866 | std::string Path::URLEncode(std::string_view str) |