Re: dealing with utf8 filenames



Alan M. Evans writes:
This seems like an awful lot to go through just to get a filename
without an extension.

Not really...

In particular, I'm unhappy with the amount of frivolous dynamic
allocation.

Well, dynamic allocation is magnitudes faster than going to disk and
reading the directory, so what's the problem? This isn't like the
inner loop of something, executed zillions of times per second, is it?

Also, I don't think the string returned from g_utf8_casefold() is
guaranteed to be the same length as the original, so my calculation
for string length is incorrect.

Umm, no? You look at the casefolded string and calculate the length of
the part up to the '.' of that?

--tml




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