Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] [OT] C/C++: Need alternative to strsep or strtok



On Sun, Aug 17, 2003 at 04:24:45PM +0200, David Oftedal wrote:
> I'm trying to parse this korean dictionary called engdic into the EDICT 
> format (Discarding the metadata for now) in order to be able to use it 
> with gjiten2. However, I fell into the trap of trying to use strtok or 
> strsep in order to parse the lines into individual fields, instead of 
> writing my own functions. I've got them to stop segfaulting, but they 
> still don't work. So I'm giving up on those.
> 
> Is there a C++ equivalent of strsep / strtok that actually works?
> 

You may have already tried this but I will mention it anyway. This sounds
like you should be using the string/cstring classes and the templating
features of c++ to create a datatype big enough for a character in the
encoding. These headers define versions of the classic C functions as well.

Tim.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links