X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flibpspp%2Fstr.h;h=17584f8920ecea5116dde25d127b925f9242c7fb;hb=33f2a20744e97951032b729b3d98b611b071371f;hp=9c20cfba6553551572487ec151cfb026f329eaca;hpb=b525a9596e60d5ae4c6c464b4a426b77ade3dd72;p=pspp diff --git a/src/libpspp/str.h b/src/libpspp/str.h index 9c20cfba65..17584f8920 100644 --- a/src/libpspp/str.h +++ b/src/libpspp/str.h @@ -92,11 +92,10 @@ struct substring ss_tail (struct substring, size_t); /* Constructors and destructor that allocate and deallocate memory. */ struct pool; -void ss_alloc_substring (struct substring *, struct substring); +struct substring ss_clone (struct substring); +struct substring ss_clone_pool (struct substring, struct pool *); void ss_alloc_uninit (struct substring *, size_t); void ss_realloc (struct substring *, size_t); -void ss_alloc_substring_pool (struct substring *, struct substring, - struct pool *); void ss_alloc_uninit_pool (struct substring *, size_t, struct pool *); void ss_dealloc (struct substring *); @@ -118,6 +117,7 @@ void ss_advance (struct substring *, size_t); bool ss_match_byte (struct substring *, char); int ss_match_byte_in (struct substring *, struct substring); bool ss_match_string (struct substring *, const struct substring); +bool ss_match_string_case (struct substring *, const struct substring); int ss_get_byte (struct substring *); size_t ss_get_bytes (struct substring *, size_t n, struct substring *); bool ss_get_until (struct substring *, char delimiter, struct substring *); @@ -132,12 +132,15 @@ int ss_at (struct substring, size_t idx); int ss_first (struct substring); int ss_last (struct substring); bool ss_starts_with (struct substring, struct substring prefix); +bool ss_starts_with_case (struct substring, struct substring prefix); bool ss_ends_with (struct substring, struct substring suffix); +bool ss_ends_with_case (struct substring, struct substring suffix); size_t ss_span (struct substring, struct substring skip_set); size_t ss_cspan (struct substring, struct substring stop_set); size_t ss_find_byte (struct substring, char); size_t ss_find_substring (struct substring, struct substring); int ss_compare (struct substring, struct substring); +int ss_compare_rpad (struct substring, struct substring); int ss_compare_case (struct substring, struct substring); int ss_equals (struct substring, struct substring); int ss_equals_case (struct substring, struct substring); @@ -240,6 +243,7 @@ void ds_put_byte_multiple (struct string *, int ch, size_t); void ds_put_unichar (struct string *, ucs4_t uc); void ds_put_cstr (struct string *, const char *); void ds_put_substring (struct string *, struct substring); +void ds_put_substring_multiple (struct string *, struct substring, size_t n); void ds_put_vformat (struct string *st, const char *, va_list) PRINTF_FORMAT (2, 0); void ds_put_c_vformat (struct string *st, const char *, va_list)