michaelk Posted September 11, 2017 Share Posted September 11, 2017 I have a string variable which is digits followed by a space followed by stuff I don't care about or want. sooooo 1). I make the variable a type DYNARRAY[ ] OF CHAR. 2). I use POS(' '); to find the first space in the array. how do I create a string variable that is only 1 thru (POS(' ') -1) of that array? Am I on the right track? mk Quote Link to comment
Pat Stanford Posted September 11, 2017 Share Posted September 11, 2017 MyPos:=Pos(' ',MyString); MyShortString:=Copy(MyString,1,MyPos-1); 1 Quote Link to comment
michaelk Posted September 11, 2017 Author Share Posted September 11, 2017 Ha! Thanks, Pat. I've been reading through almost all of the functions in the string section of the function ref. But I skipped Copy because that didn't sound like what I wanted to do! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.