renamed ifCRLF to trimCRLF to more accurately reflect the function.

This commit is contained in:
brad Arant 2024-11-24 11:07:53 -08:00
parent 8f5dd52c6a
commit d6d16a1b7f
3 changed files with 6 additions and 4 deletions

View File

@ -12,7 +12,7 @@ namespace coreutils {
sections = in.split(temp.str().c_str());
for(int ix = 0; ix < sections.size(); ++ix) {
sections[ix].ifNext("\r\n");
sections[ix].ifCRLF();
sections[ix].trimCRLF();
Log(LOG_DEBUG_1) << "[" << sections[ix] << "].";
if(sections[ix].equals("--"))
sections[ix] = ZString("");

View File

@ -537,7 +537,7 @@ namespace coreutils {
return *(cursor + index);
}
bool ZString::ifCRLF() {
bool ZString::trimCRLF() {
int len = length;
if (*(data + length - 1) == '\n')
--length;

View File

@ -413,10 +413,12 @@ namespace coreutils {
char charAt(int index);
///
///
/// Retrurns true if the end of the ZString ends with CRLF. Does not
/// Affect cursor position unless cursor is beyond the length of the line
/// after trimming.
///
bool ifCRLF();
bool trimCRLF();
///
/// Returns the character at the cursor and advances the cursor one