adjust start/end of word when trimming

This commit is contained in:
dockes 2005-09-22 14:09:04 +00:00
parent d8297680b1
commit e1c3dbfeb3

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: textsplit.cpp,v 1.11 2005-09-22 11:10:11 dockes Exp $ (C) 2004 J.F.Dockes"; static char rcsid[] = "@(#$Id: textsplit.cpp,v 1.12 2005-09-22 14:09:04 dockes Exp $ (C) 2004 J.F.Dockes";
#endif #endif
#ifndef TEST_TEXTSPLIT #ifndef TEST_TEXTSPLIT
@ -99,6 +99,7 @@ bool TextSplit::emitterm(bool isspan, string &w, int pos,
case '@': case '@':
case '\'': case '\'':
w.erase(w.length()-1); w.erase(w.length()-1);
btend--; if (btend < 0) btend=0;
break; break;
default: default:
goto breakloop1; goto breakloop1;
@ -112,6 +113,7 @@ bool TextSplit::emitterm(bool isspan, string &w, int pos,
case ',': case ',':
case '\'': case '\'':
w.erase(w.length()-1); w.erase(w.length()-1);
btstart++;
break; break;
default: default:
goto breakloop2; goto breakloop2;