mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 08:07:46 +00:00
fix style
This commit is contained in:
parent
f4a56cf636
commit
35a7db9f54
1 changed files with 8 additions and 4 deletions
|
@ -52,11 +52,15 @@ void exportFile( const std::string& path )
|
|||
}
|
||||
}
|
||||
|
||||
bool replace(std::string& str, const std::string& from, const std::string& to) {
|
||||
size_t start_pos = str.find(from);
|
||||
if(start_pos == std::string::npos)
|
||||
bool replace( std::string& str, const std::string& from, const std::string& to )
|
||||
{
|
||||
size_t start_pos = str.find( from );
|
||||
|
||||
if( start_pos == std::string::npos )
|
||||
return false;
|
||||
str.replace(start_pos, from.length(), to);
|
||||
|
||||
str.replace( start_pos, from.length(), to );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue