|
From: Danny R. <dro...@ho...> - 2002-12-28 18:56:28
|
Hi, Another problem to solve.. i wish to make a routine which gives me a = substring or trimmed down on the following conditions that i can start from anypoint in the string untill the = offset is reached. so for example mytext =3D "this is a test"; result =3D substring(mytext,6,2); result would now have to contain the 2nd word "is"... thats my goal.. i couldn't figure out a single function for it, if = someone knows a solution.. would be great..=20 or if you know how to "build" a new string, which in my thought has to = go like this: mytext =3D "this is a test"; mytext ++ ( 5 times) to set a pointer somehow to the 5th char in the = string. subtext =3D subtext + pointer to mytext mytext ++ (1 time) to go to the next char in the string subtext =3D subtext + point to mytext which will give me "is" in the subtext... I could find decent material while searching the internet.. normaly, in = my pas i always had the benefit of functions called substr and trimstr but they dont exist as far as i know for cpp..=20 thanks for any help.. danny |