This challenge will be broken down into two parts. One part being this part and the next part will be being the ...next part. (*blink*)
I want to be able to edit just part of a text string. (Okay, i can hear what your saying; -"Duh!? ...he be stupid!" but bear with me.)
If i have a text string like so: "Jack and Jill ran up the hill" And most of this text will NEVER change except for one part; "Jack" (I guess Jill gets arround *LoL*. ...*sigh* ok, I'm sorry for that. that was just bad!?) So wouldnt it be nice to lock up that text so when you go to edit that string only a little piece of text is editable?!
How about we do this: We have a set start point and a end point marker. Lets use brackets. '<' & '>' So our string would/should look like this: "<Jack> and Jill ran up the hill." And when we go to edit the string, all we give to the user is "Jack".
How about that. ...Okay that isnt very hard at all but the next part might be.
So your challenge is to build me a procedure that will prompt me only text between the brackets. Here is your string: "<Jack> and Jill ran up the hill."
TIP: Those of you new to lisp, should get in on this one as well, this will not be a hard procedure at all. In fact, I will help you out a bit. Look into the AutoLisp function: "subst" and see if you can think of a way to test the overall string for those brackets. The main workhorse of this challange will be a procedure that will acccept as an argument a string, string position, and length. ...trust me. If you get stuck, just sit back and see if you were on the right track. but try to get something down on paper before looking at other peoples code.