@@ -494,14 +494,23 @@ hts_idx_t *hts_idx_load2(const char *fn, const char *fnidx);
494494*/
495495long long hts_parse_decimal (const char * str , char * * strend , int flags );
496496
497+ /// Equivalent to hts_parse_region(str, NULL, beg, end, HTS_PARSE_THOUSANDS_SEP)
498+ const char * hts_parse_reg (const char * str , int * beg , int * end );
499+
497500/// Parse a "CHR:START-END"-style region string
498- /** @param str String to be parsed
499- @param beg Set on return to the 0-based start of the region
500- @param end Set on return to the 1-based end of the region
501- @return Pointer to the colon or '\0' after the reference sequence name,
502- or NULL if @a str could not be parsed.
501+ /** @param str String to be parsed
502+ @param strend If non-NULL, set on return to point to the first character
503+ in @a str after those forming the parsed region
504+ @param beg Set on return to the 0-based start of the region
505+ @param end Set on return to the 1-based end of the region
506+ @param flags Or'ed-together combination of HTS_PARSE_* flags
507+ @return Pointer to the colon or terminating character after the reference
508+ sequence name, or NULL if @a str could not be parsed.
509+
510+ When @a strend is NULL, a warning will be printed (if hts_verbose is 2
511+ or more) if there are any trailing characters after the region string.
503512*/
504- const char * hts_parse_reg (const char * str , int * beg , int * end );
513+ const char * hts_parse_region (const char * str , char * * strend , int * beg , int * end , int flags );
505514
506515 hts_itr_t * hts_itr_query (const hts_idx_t * idx , int tid , int beg , int end , hts_readrec_func * readrec );
507516 void hts_itr_destroy (hts_itr_t * iter );
0 commit comments