Changeset 453
- Timestamp:
- 07/20/05 15:37:14 (8 years ago)
- Files:
-
- 1 modified
-
trunk/pdns/modules/ldapbackend/utils.hh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/modules/ldapbackend/utils.hh
r235 r453 74 74 75 75 76 inline string ip2ptr4( stringip )76 inline string ip2ptr4( const string& ip ) 77 77 { 78 78 string ptr; … … 90 90 91 91 92 inline string ip2ptr6( stringip )92 inline string ip2ptr6( const string& ip ) 93 93 { 94 94 string ptr, part, defstr; … … 117 117 } 118 118 119 120 inline string strbind( const string& search, const string& replace, string subject ) 121 { 122 size_t pos = 0; 123 124 125 while( ( pos = subject.find( search, pos ) ) != string::npos ) 126 { 127 subject.replace( pos, search.size(), replace ); 128 pos += replace.size(); 129 } 130 131 return subject; 132 } 133 119 134 #endif