* @brief Unifies line ends in the given string to LF. * * @return String @a str with unified line ends. * In a greater detail, this function converts CRLF and CR inside @a str to LF. */
| 621 | * In a greater detail, this function converts CRLF and CR inside @a str to LF. |
| 622 | */ |
| 623 | std::string unifyLineEnds(const std::string &str) { |
| 624 | return replaceAll(replaceAll(str, "\r\n", "\n"), "\r", "\n"); |
| 625 | } |
| 626 | |
| 627 | /** |
| 628 | * @brief Returns @a str with backslashes before characters that need to be |