knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
Pipeline.cpp File Reference
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include "string"
#include "knowrob/storage/mongo/Pipeline.h"
#include "knowrob/Logger.h"
#include "knowrob/URI.h"
#include "knowrob/semweb/GraphPattern.h"
#include "knowrob/semweb/GraphSequence.h"
#include "knowrob/semweb/GraphBuiltin.h"
#include "knowrob/storage/mongo/MongoTerm.h"
#include "knowrob/storage/mongo/MongoTriplePattern.h"
Include dependency graph for Pipeline.cpp:

Go to the source code of this file.

Functions

void replaceAll (std::string &str, const std::string &from, const std::string &to)
 

Function Documentation

◆ replaceAll()

void replaceAll ( std::string &  str,
const std::string &  from,
const std::string &  to 
)

Definition at line 360 of file Pipeline.cpp.

360  {
361  size_t startPos = 0;
362  while ((startPos = str.find(from, startPos)) != std::string::npos) {
363  str.replace(startPos, from.length(), to);
364  startPos += to.length(); // Handles case where 'to' is a substring of 'from'
365  }
366 }