diff --git a/IMFMultipart.cpp b/IMFMultipart.cpp index a64e64e..a81057b 100644 --- a/IMFMultipart.cpp +++ b/IMFMultipart.cpp @@ -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(""); diff --git a/ZString.cpp b/ZString.cpp index 668c195..5f0b1ec 100644 --- a/ZString.cpp +++ b/ZString.cpp @@ -537,7 +537,7 @@ namespace coreutils { return *(cursor + index); } - bool ZString::ifCRLF() { + bool ZString::trimCRLF() { int len = length; if (*(data + length - 1) == '\n') --length; diff --git a/ZString.h b/ZString.h index c844540..dc1436e 100644 --- a/ZString.h +++ b/ZString.h @@ -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