ucx/string.h

changeset 149
3bf87676d42d
parent 148
c27c2425c0b1
child 160
302dddaf741d
equal deleted inserted replaced
148:c27c2425c0b1 149:3bf87676d42d
299 * <code>memcmp()</code> otherwise (i.e. 0 if the strings match) 299 * <code>memcmp()</code> otherwise (i.e. 0 if the strings match)
300 */ 300 */
301 int sstrcmp(sstr_t s1, sstr_t s2); 301 int sstrcmp(sstr_t s1, sstr_t s2);
302 302
303 /** 303 /**
304 * Compares two UCX strings ignoring the case.
305 *
306 * At first it compares the sstr_t.length attribute of the two strings. If and
307 * only if the lengths match, both strings are compared char by char ignoring
308 * the case.
309 *
310 * @param s1 the first string
311 * @param s2 the second string
312 * @return -1, if the length of s1 is less than the length of s2 or 1, if the
313 * length of s1 is greater than the length of s2 or the difference between the
314 * first two differing characters otherwise (i.e. 0 if the strings match and
315 * no characters differ)
316 */
317 int sstrcasecmp(sstr_t s1, sstr_t s2);
318
319 /**
304 * Creates a duplicate of the specified string. 320 * Creates a duplicate of the specified string.
305 * 321 *
306 * The new sstr_t will contain a copy allocated by standard 322 * The new sstr_t will contain a copy allocated by standard
307 * <code>malloc()</code>. So developers <b>MUST</b> pass the sstr_t.ptr to 323 * <code>malloc()</code>. So developers <b>MUST</b> pass the sstr_t.ptr to
308 * <code>free()</code>. 324 * <code>free()</code>.

mercurial