- setlength(result,c+b);\r
- move(buf[bufpointer],result[c+1],b);\r
- bufpointer := d+1;\r
+ if trimchar then begin\r
+ setlength(result,c+b-1);\r
+ move(buf[bufpointer],result[c+1],b-1);\r
+ bufpointer := d+1;\r
+ end else begin\r
+ setlength(result,c+b);\r
+ move(buf[bufpointer],result[c+1],b);\r
+ bufpointer := d+1;\r
+ end;\r