Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka committed Dec 18, 2024
1 parent 087f8a9 commit a2c5c43
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Src/DiffWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,16 @@ static void ReplaceChars(std::string & str, const char* chars, const char *rep)
}
}

/**
* @brief Remove the end-of-line (EOL) characters (LF, CR, or CRLF) from the end of a string.
*
* This function removes any of the following EOL characters from the end of the string:
* - LF (line feed, '\n')
* - CR (carriage return, '\r')
* - CRLF (carriage return + line feed, "\r\n")
*
* @param [in,out] str - A string from which the EOL characters will be removed.
*/
static void RemoveEOL(std::string& str)
{
if (str.empty())
Expand Down

0 comments on commit a2c5c43

Please sign in to comment.