… | |
… | |
99 | inline int strlen (const shstr &sh) |
99 | inline int strlen (const shstr &sh) |
100 | { |
100 | { |
101 | return sh.length (); |
101 | return sh.length (); |
102 | } |
102 | } |
103 | |
103 | |
|
|
104 | inline int strcmp (const shstr &a, const shstr &b) |
|
|
105 | { |
|
|
106 | // TODO: use this to find all the occurences of people using strcmp |
|
|
107 | // all uses should be bogus, as we should be never interested in |
|
|
108 | // comparing shstr's alphabetically |
|
|
109 | #if 0 |
|
|
110 | extern void do_not_use_strcmp_to_compare_shstr_values (); |
|
|
111 | do_not_use_strcmp_to_compare_shstr_values (); |
|
|
112 | #endif |
|
|
113 | return a != b; |
|
|
114 | } |
|
|
115 | |
104 | // only good for mass comparisons to shstr objects |
116 | // only good for mass comparisons to shstr objects |
105 | struct shstr_cmp |
117 | struct shstr_cmp |
106 | { |
118 | { |
107 | const char *s; |
119 | const char *s; |
108 | |
120 | |