Batch #835 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review. - fn_18244 DecodeTextEscapes: logic confirmed by peer review Reviewed-by: ragnarok-clanker Adds to the build: Source/Utility/TextEscapes.cpp
16 lines
568 B
C++
16 lines
568 B
C++
#include "Utility/TextEscapes.h"
|
|
|
|
// FUNCTION: fn_18244
|
|
void DecodeTextEscapes(std::string& text) {
|
|
for (std::size_t position = text.find("\\r"); position != std::string::npos; position = text.find("\\r")) {
|
|
text.replace(position, 2, "\r", 1);
|
|
}
|
|
|
|
for (std::size_t position = text.find("\\n"); position != std::string::npos; position = text.find("\\n")) {
|
|
text.replace(position, 2, "\n", 1);
|
|
}
|
|
|
|
for (std::size_t position = text.find("\\\""); position != std::string::npos; position = text.find("\\\"")) {
|
|
text.replace(position, 2, "\"", 1);
|
|
}
|
|
}
|