- improve string helper - add startsWith() method + fix indentation
This commit is contained in:
parent
96c2ed3d94
commit
2564e690e8
|
|
@ -348,6 +348,12 @@ std::string StringHelper::decodeUri(const std::string& s)
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool StringHelper::startsWith(const std::string& s, const std::string& prefix)
|
||||
{
|
||||
std::string::size_type p = s.find(prefix);
|
||||
return p == 0;
|
||||
}
|
||||
|
||||
#define XML_HEADER "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>"
|
||||
// --------------------- XcapHelper -----------------
|
||||
std::string XcapHelper::buildBuddyList(std::string listName, std::vector<std::string> buddies)
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ public:
|
|||
static std::string replace(const std::string& s, char f, char r);
|
||||
static std::string replace(const std::string& s, const std::string& tmpl, const std::string& n);
|
||||
static std::string decodeUri(const std::string& s);
|
||||
static bool startsWith(const std::string& s, const std::string& prefix);
|
||||
};
|
||||
|
||||
class XcapHelper
|
||||
|
|
|
|||
Loading…
Reference in New Issue