Posts: 75
Threads: 17
Joined: Jan 2009
Reputation:
0
26.01.2012, 20:53
(
Последний раз редактировалось Ed2ka49; 26.01.2012 в 22:55.
)
All good now, works fine, thank you for your help though!
Posts: 75
Threads: 17
Joined: Jan 2009
Reputation:
0
26.01.2012, 21:12
(
Последний раз редактировалось Ed2ka49; 26.01.2012 в 22:55.
)
All good now, works fine, thank you for your help though!
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
May I ask why you're trying to do that?
Posts: 75
Threads: 17
Joined: Jan 2009
Reputation:
0
I want to get some certain chars from one string and add them to another one, simple.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Yes, but why? Are you actually trying to do something, or just fooling around? Can you give me an example of when this would be used?
The only thing I can think of that is capable of doing this is strmid. It takes a range of characters (or one, if you like) from one string and puts them into another string. You can then strins() that into the string you wanted to put the characters in.
Posts: 75
Threads: 17
Joined: Jan 2009
Reputation:
0
EDIT: I've tried using the strmid function but the only problem is that it reset the DES string all the time. I want the chars to continue be added without the whole string being reset. Is there any way to do it?
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
You need 3 strings.
new string[] = "Some string ()"
new string_dest[];
new string_insert[] = "insert 123 in to the brackets";
Use strmid to extract "123" and put it in string_dest, then strins string_dest into the 'string'.