417 return cx_strsplit(cx_strcast(string), |
417 return cx_strsplit(cx_strcast(string), |
418 delim, limit, (cxstring *) output); |
418 delim, limit, (cxstring *) output); |
419 } |
419 } |
420 |
420 |
421 size_t cx_strsplit_ma( |
421 size_t cx_strsplit_ma( |
422 CxAllocator const *allocator, |
422 const CxAllocator *allocator, |
423 cxmutstr string, |
423 cxmutstr string, |
424 cxstring delim, |
424 cxstring delim, |
425 size_t limit, |
425 size_t limit, |
426 cxmutstr **output |
426 cxmutstr **output |
427 ) { |
427 ) { |
458 return -1; |
458 return -1; |
459 } |
459 } |
460 } |
460 } |
461 |
461 |
462 int cx_strcmp_p( |
462 int cx_strcmp_p( |
463 void const *s1, |
463 const void *s1, |
464 void const *s2 |
464 const void *s2 |
465 ) { |
465 ) { |
466 cxstring const *left = s1; |
466 const cxstring *left = s1; |
467 cxstring const *right = s2; |
467 const cxstring *right = s2; |
468 return cx_strcmp(*left, *right); |
468 return cx_strcmp(*left, *right); |
469 } |
469 } |
470 |
470 |
471 int cx_strcasecmp_p( |
471 int cx_strcasecmp_p( |
472 void const *s1, |
472 const void *s1, |
473 void const *s2 |
473 const void *s2 |
474 ) { |
474 ) { |
475 cxstring const *left = s1; |
475 const cxstring *left = s1; |
476 cxstring const *right = s2; |
476 const cxstring *right = s2; |
477 return cx_strcasecmp(*left, *right); |
477 return cx_strcasecmp(*left, *right); |
478 } |
478 } |
479 |
479 |
480 cxmutstr cx_strdup_a( |
480 cxmutstr cx_strdup_a( |
481 CxAllocator const *allocator, |
481 const CxAllocator *allocator, |
482 cxstring string |
482 cxstring string |
483 ) { |
483 ) { |
484 cxmutstr result = { |
484 cxmutstr result = { |
485 cxMalloc(allocator, string.length + 1), |
485 cxMalloc(allocator, string.length + 1), |
486 string.length |
486 string.length |
776 return cx_strtok_next(ctx, (cxstring *) token); |
776 return cx_strtok_next(ctx, (cxstring *) token); |
777 } |
777 } |
778 |
778 |
779 void cx_strtok_delim( |
779 void cx_strtok_delim( |
780 CxStrtokCtx *ctx, |
780 CxStrtokCtx *ctx, |
781 cxstring const *delim, |
781 const cxstring *delim, |
782 size_t count |
782 size_t count |
783 ) { |
783 ) { |
784 ctx->delim_more = delim; |
784 ctx->delim_more = delim; |
785 ctx->delim_more_count = count; |
785 ctx->delim_more_count = count; |
786 } |
786 } |