Change some RString methods to free functions

These ones aren't a std::string method. Doing this helps the RString to
std::string migration.
This commit is contained in:
Arthur Eubanks
2025-04-29 22:01:23 -07:00
committed by teejusb
parent 9449317430
commit 995f0ea8c1
109 changed files with 587 additions and 618 deletions
+3 -3
View File
@@ -72,7 +72,7 @@ bool CsvFile::ReadFile( RageFileBasic &f )
while(true);
RString sValue = line;
sValue = sValue.Left( iEnd );
sValue = Left(sValue, iEnd);
vs.push_back( sValue );
line.erase( line.begin(), line.begin()+iEnd );
@@ -87,7 +87,7 @@ bool CsvFile::ReadFile( RageFileBasic &f )
iEnd = line.size(); // didn't find an end. Take the whole line
RString sValue = line;
sValue = sValue.Left( iEnd );
sValue = Left(sValue, iEnd);
vs.push_back( sValue );
line.erase( line.begin(), line.begin()+iEnd );
@@ -122,7 +122,7 @@ bool CsvFile::WriteFile( RageFileBasic &f ) const
for (auto value = line.begin(); value != line.end(); ++value)
{
RString sVal = *value;
sVal.Replace( "\"", "\"\"" ); // escape quotes to double-quotes
Replace(sVal, "\"", "\"\""); // escape quotes to double-quotes
sLine += "\"" + sVal + "\"";
if( value != line.end()-1 )
sLine += ",";