| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /*
- * Author: Patrick-Christopher Mattulat
- * Co-Author: Claude Sonnet 4.6 (LLM)
- * Company: Lynar Studios
- * E-Mail: webmaster@lynarstudios.com
- * Created: 2023-02-04
- * Changed: 2026-06-23
- *
- * */
- #include <ls-std/io/NewLine.hpp>
- using ls::standard::io::NewLine;
- using std::string;
- NewLine::NewLine() = default;
- NewLine::~NewLine() = default;
- string NewLine::get()
- {
- string newLine{};
- #if defined(unix) || defined(__APPLE__)
- newLine = getUnixNewLine();
- #endif
- #ifdef _WIN32
- newLine = NewLine::getWindowsNewLine();
- #endif
- return newLine;
- }
- string NewLine::getUnixNewLine()
- {
- return "\n";
- }
- string NewLine::getWindowsNewLine()
- {
- return "\r\n";
- }
|