aboutsummaryrefslogtreecommitdiff
path: root/backends/networking
diff options
context:
space:
mode:
authorAlexander Tkachev2016-07-06 15:37:13 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit627bda9d82c178641e5b5253379c21ce556eb3c2 (patch)
treefd82f68f1380450bee225f6b0adf62eff2894f15 /backends/networking
parente47b6c04b30565b1db238c2784e562f3f4472d70 (diff)
downloadscummvm-rg350-627bda9d82c178641e5b5253379c21ce556eb3c2.tar.gz
scummvm-rg350-627bda9d82c178641e5b5253379c21ce556eb3c2.tar.bz2
scummvm-rg350-627bda9d82c178641e5b5253379c21ce556eb3c2.zip
COMMON: Add replace(String, String, String)
Searches for a substring in the string and replaces it with the other string.
Diffstat (limited to 'backends/networking')
-rw-r--r--backends/networking/sdl_net/indexpagehandler.cpp9
-rw-r--r--backends/networking/sdl_net/indexpagehandler.h1
2 files changed, 0 insertions, 10 deletions
diff --git a/backends/networking/sdl_net/indexpagehandler.cpp b/backends/networking/sdl_net/indexpagehandler.cpp
index c44c3d4a5a..b3790a8393 100644
--- a/backends/networking/sdl_net/indexpagehandler.cpp
+++ b/backends/networking/sdl_net/indexpagehandler.cpp
@@ -249,15 +249,6 @@ Common::String IndexPageHandler::code() { return _code; }
/// utils
-void IndexPageHandler::replace(Common::String &source, const Common::String &what, const Common::String &with) {
- const char *cstr = source.c_str();
- const char *position = strstr(cstr, what.c_str());
- if (position) {
- uint32 index = position - cstr;
- source.replace(index, what.size(), with);
- }
-}
-
Common::Archive *IndexPageHandler::getZipArchive() {
// first search in themepath
if (ConfMan.hasKey("themepath")) {
diff --git a/backends/networking/sdl_net/indexpagehandler.h b/backends/networking/sdl_net/indexpagehandler.h
index 0ccbf32480..a75c7a0381 100644
--- a/backends/networking/sdl_net/indexpagehandler.h
+++ b/backends/networking/sdl_net/indexpagehandler.h
@@ -61,7 +61,6 @@ class IndexPageHandler: public GUI::CommandSender {
*/
bool transformPath(Common::String &path, Common::String &prefixToRemove, Common::String &prefixToAdd);
- void replace(Common::String &source, const Common::String &what, const Common::String &with);
Common::Archive *getZipArchive();
Common::ArchiveMemberList listArchive();
Common::SeekableReadStream *getArchiveFile(Common::String name);