Advertisement

The "string" datatype...underrated?

Started by July 18, 2000 04:03 PM
9 comments, last by Joker2000 24 years, 6 months ago
gimp:

the best way to make a case insensitive string is to use basic_string with custom char_traits - ie derive from char_traits, make the ''compare'' func case insensitive then typedef a case insensitive string like this:

typedef basic_string string_nocase;

(but use better names!)


but if its just a comparison you''re after (not a full blown case insensitive string class), the stricmp method you used is fine.

This topic is closed to new replies.

Advertisement