source: dev/trunk/ab5.0/jenga/src/common/String.cpp@ 514

Last change on this file since 514 was 472, checked in by dai_9181, 17 years ago

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

File size: 599 bytes
Line 
1#include <boost/foreach.hpp>
2#include <jenga/include/common/String.h>
3
4
5bool Jenga::Common::IsExistString( const Jenga::Common::Strings &strings, const std::string &findStr )
6{
7 BOOST_FOREACH( const std::string &str, strings )
8 {
9 if( str == findStr )
10 {
11 return true;
12 }
13 }
14 return false;
15}
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 TracBrowser for help on using the repository browser.