renamed ifCRLF to trimCRLF to more accurately reflect the function.
This commit is contained in:
parent
8f5dd52c6a
commit
d6d16a1b7f
@ -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("");
|
||||
|
@ -537,7 +537,7 @@ namespace coreutils {
|
||||
return *(cursor + index);
|
||||
}
|
||||
|
||||
bool ZString::ifCRLF() {
|
||||
bool ZString::trimCRLF() {
|
||||
int len = length;
|
||||
if (*(data + length - 1) == '\n')
|
||||
--length;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user