Changeset 472 in dev for trunk/ab5.0/jenga
- Timestamp:
- Mar 31, 2008, 12:33:24 PM (17 years ago)
- Location:
- trunk/ab5.0/jenga
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/jenga/include/common/String.h
r465 r472 11 11 bool IsExistString( const Jenga::Common::Strings &strings, const std::string &findStr ); 12 12 13 std::string& StringReplace( std::string& str, const std::string sb, const std::string sa ); 14 13 15 } 14 16 } -
trunk/ab5.0/jenga/src/common/String.cpp
r465 r472 14 14 return false; 15 15 } 16 17 std::string& Jenga::Common::StringReplace( std::string& str, const std::string sb, const std::string sa ) 18 { 19 std::string::size_type n, nb = 0; 20 21 while ((n = str.find(sb,nb)) != std::string::npos) 22 { 23 str.replace(n,sb.size(),sa); 24 nb = n + sa.size(); 25 } 26 27 return str; 28 }
Note:
See TracChangeset
for help on using the changeset viewer.