All pastes #284817 Raw Edit

Someone

public c v1 · immutable
#284817 ·published 2006-12-19 09:34 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++;}