mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-03 17:27:47 +00:00
fix style
This commit is contained in:
parent
7533fed269
commit
aadcf07a0b
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