I l@ve RuBoard |
![]() ![]() |
Item 3. Case-Insensitive Strings桺art 2Difficulty: 5 How usable is the ci_string we created in Item 2? Now we'll focus on usability issues, see what design problems or tradeoffs we encounter, and fill in some of the remaining gaps. Consider again the solution for Item 2 (ignoring the function bodies): struct ci_char_traits : public char_traits<char> { static bool eq( char c1, char c2 ) { /*...*/ } static bool lt( char c1, char c2 ) { /*...*/ } static int compare( const char* s1, const char* s2, size_t n ) { /*...*/ } static const char* find( const char* s, int n, char a ) { /*...*/ } }; For this Item, answer the following related questions as completely as possible:
|
I l@ve RuBoard |
![]() ![]() |