|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
equivalent to PHP explode or PERL split
Hi , with my C more than a little rusty
![]() how do I take a string and <php_version>explode()</php_version> it by a known delimiter? I am trying to do the following (pseudo-code) //where argv[1] is a string "value1::value2::value3" //php example' $bits= explode("::",argv[1]); put ( bundle, "CLIENTID", $bits[0]); put ( bundle, "CARDDATA", $bits[1]); put ( bundle, "CARDEXPIRYDATE", $bits[2]); //etc// any pointers appreciated |
|
#2
|
||||
|
||||
|
strtok(), though it's not as easy to use. You basically pass it a set of delimiters and it breaks down the string into "tokens."
__________________
Jon Sagara "Me fail English? That's unpossible!" |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > equivalent to PHP explode or PERL split |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|