in reply to Re: Slicing a string on words
in thread Slicing a string on words

See this? This is my head banging into the wall. Wall, meet head. Head, wall.

Here's what the problem seems to be: when I tested it, it was with a short string and a window large enough that the string ended well before the end of the window. IE, a 20 word string with a 100 word window.

Argh. I'm not sure where to go from here. Perhaps coffee is a good idea.

Replies are listed 'Best First'.
Re: Re: Re: Slicing a string on words
by dga (Hermit) on Aug 28, 2001 at 03:37 UTC

    The whiles in my update should bail out when they run out of matches.

    You may test on some input but it seems to take equal or less than window just fine