Changeset 472 in dev for trunk/ab5.0/jenga


Ignore:
Timestamp:
Mar 31, 2008, 12:33:24 PM (17 years ago)
Author:
dai_9181
Message:

デプロイ時にcore.lib/cored.libのビルドもできるようにした。

Location:
trunk/ab5.0/jenga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/jenga/include/common/String.h

    r465 r472  
    1111bool IsExistString( const Jenga::Common::Strings &strings, const std::string &findStr );
    1212
     13std::string& StringReplace( std::string& str, const std::string sb, const std::string sa );
     14
    1315}
    1416}
  • trunk/ab5.0/jenga/src/common/String.cpp

    r465 r472  
    1414    return false;
    1515}
     16
     17std::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.