|
Post by Azan on Jul 11, 2005 19:34:35 GMT -5
Heres a code that will get the last word in a string (note you must have a space before the last word) (still a little buggy, but example included) Print getlastword$("yo whats up", "") WaitKey
Function getlastword$(Sentence$, Lastword$) While Not Right$(Sentence, 1) = " " LastWord = Right$(Sentence, 1) + LastWord Sentence = Left$(Sentence, Len(Sentence) - 1) Wend Return LastWord$ End Function
|
|
|
Post by Umbrafire on Jul 11, 2005 22:25:56 GMT -5
uhh...im not quite sure I understand the purpose of this module...
|
|
|
Post by Azan on Jul 11, 2005 22:57:24 GMT -5
Im currently using it so that I can detect if a word should go on the next line when it hits the edge of a scroll window, its kindof hard to explane but its useful.
|
|
|
Post by Umbrafire on Jul 12, 2005 14:31:26 GMT -5
oh, that makes sense, good luck w/ your scroll mod
|
|