suchat_cs2007 wrote:
> help me please, i have to cut string. 
> Ex1: 1,000413,185019 ->
> x[0]=1
> x[1]=000413
> x[2]=185019
> 
> Ex2. 1,00004123,4123421,73948473,3243847 ->
> x[0]=1
> x[1]=00004123
> x[2]=4123421
> x[3]=73948473
> x[4]=3243847
> 
> but i have create fn. for support many string pass this fn.
> 
> 
> Thank you so much.

C?  strtok();  Have fun with empty fields.

C++?  Roll your own:
http://www.hispafuentes.com/hf-doc/HOWTOs/C++Programming-HOWTO-html/C++Programming-HOWTO-7.html
(section 7.3 - completely untested but probably works)


Safe C++?  BString Explode does exactly what you want:

BString TestStr("1,00004123,4123421,73948473,3243847");
Block<BString> x;

TestStr.Explode(x, ',');

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* VerifyMyPC 2.5
Change tracking and management tool.
Reduce tech. support times from 2 hours to 5 minutes.

http://www.CubicleSoft.com/VerifyMyPC/

Reply via email to