All pastes #284818 Raw Edit

Untitled

public c v1 · immutable
#284818 ·published 2006-12-19 09:35 UTC
rendered paste body
short foundword= 0, eraseamount= -1;							/* doesn't work in situation in which there are whitespaces after word Example: bar foo___(ctrl-backspace here)Result should be bar_but is bar foo____ is whitespace*/						for(x=but->pos; x>=0; x--) {  if(str[x] != ' ' && foundword == 0) {/* there are other possibilities also? */    foundword= 1;  }  if(str[x] == ' ' && foundword == 1) {    break;  }  eraseamount++;}