]> git.pld-linux.org Git - packages/pdns.git/blame - pdns-strbind.patch
- strbind patch obsoleted
[packages/pdns.git] / pdns-strbind.patch
CommitLineData
cefe18f4 1--- pdns-2.9.17/modules/ldapbackend/utils.hh 2004-02-22 10:35:01.000000000 +0100
2+++ pdns-2.9.17.new/modules/ldapbackend/utils.hh 2005-05-20 11:15:40.530121464 +0200
3@@ -73,7 +73,7 @@
4 }
5
6
7-inline string ip2ptr4( string ip )
8+inline string ip2ptr4( const string& ip )
9 {
10 string ptr;
11 vector<string> parts;
12@@ -89,7 +89,7 @@
13 }
14
15
16-inline string ip2ptr6( string ip )
17+inline string ip2ptr6( const string& ip )
18 {
19 string ptr, part, defstr;
20 vector<string> parts;
21@@ -116,4 +116,19 @@
22 return ptr + "ip6.arpa";
23 }
24
25+
26+inline string strbind( const string& search, const string& replace, string subject )
27+{
28+ size_t pos = 0;
29+
30+
31+ while( ( pos = subject.find( search, pos ) ) != string::npos )
32+ {
33+ subject.replace( pos, search.size(), replace );
34+ pos += replace.size();
35+ }
36+
37+ return subject;
38+}
39+
40 #endif
This page took 1.054667 seconds and 4 git commands to generate.