strtok itu tidak thread-safe karena pake variabel statik. Sebagai alternatif bisa pake string utility function-nya GLIB yaitu g_strsplit(), lebih mudah dan ringkas serta thread-safe.
Di C ada library namanya regex (GNU) --> mirip dengan PHP. Bagi yang udah terbiasa pake perl bisa install library pcre (Perl Compatible Regular Expression). Regards, commedo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ e-mail : [EMAIL PROTECTED] YIM : commedo2k ICQ# : 131749458 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "The forest is safe because a lion lives therein and the lion is safe because it lives in a forest. Likewise the friendship of persons rests on mutual help. -- Laukikanyay" comm> -----Original Message----- comm> From: Ronny Haryanto [mailto:[EMAIL PROTECTED]] comm> Sent: Senin, 27 Mei 2002 09:43 comm comm> To: [EMAIL PROTECTED] comm> Subject: Re: [programming] tanya tentang regex di c comm> comm> comm> On 25-May-2002, sugi wrote: comm> > aku baru belajar c ,pengen nanya ada enggak yah fungsi comm> > seperti split() yang ada di php??? comm> comm> Bikin sendiri :) lihat aja source codenya fungsi itu di comm> PHP. Di glibc comm> yg bisa mencapai tujuan yg hampir sama dg itu kayaknya comm> sih strtok(), comm> tp mungkin ada yg lain yg saya belum tau. -- Utk berhenti langganan, kirim email ke [EMAIL PROTECTED] Informasi arsip di http://www.linux.or.id/milis.php3
