Skip to content

add biseqblk, biseqcaselessblk, binsertblk, bjoinblk#143

Merged
rdmark merged 4 commits into
mainfrom
biseqblk-etc
Mar 2, 2026
Merged

add biseqblk, biseqcaselessblk, binsertblk, bjoinblk#143
rdmark merged 4 commits into
mainfrom
biseqblk-etc

Conversation

@rdmark

@rdmark rdmark commented Feb 25, 2026

Copy link
Copy Markdown
Collaborator

Port four block-oriented function variants from the parent project. These accept raw (void *, int len) pairs instead of bstring arguments, enabling use with non-bstring data and string literals via the new static convenience macros.

New functions:

  • biseqblk: compare bstring with a memory block for equality
  • biseqcaselessblk: case-insensitive variant of biseqblk
  • binsertblk: insert a memory block into a bstring at a position
  • bjoinblk: join a bstrList with a memory block separator

binsert and bjoin are refactored as thin wrappers around their blk counterparts. biseqcaseless is similarly refactored to delegate to biseqcaselessblk.

New Static macros added to bstrlib.h:

  • bcatStatic, bfromStatic, bassignStatic
  • binsertStatic, bjoinStatic
  • biseqStatic, bisstemeqStatic
  • biseqcaselessStatic, bisstemeqcaselessStatic

Novel unit tests added for all four new functions (core_047 through core_050). The rest of the changeset is adapted from code by Paul Hsieh.

@rdmark
rdmark requested a review from msteinert as a code owner February 25, 2026 22:13
@github-actions

github-actions Bot commented Feb 25, 2026

Copy link
Copy Markdown

File Coverage Lines Branches
All files 69% 74% 63%
bstring/bstraux.c 55% 64% 46%
bstring/bstrlib.c 74% 78% 71%
bstring/buniutil.c 80% 86% 73%
bstring/utf8util.c 60% 71% 50%

Minimum allowed coverage is 50%

Generated by 🐒 cobertura-action against c04d64c

Port four block-oriented function variants from the parent project.
These accept raw (void *, int len) pairs instead of bstring arguments,
enabling use with non-bstring data and string literals via the new
static convenience macros.

New functions:
- biseqblk: compare bstring with a memory block for equality
- biseqcaselessblk: case-insensitive variant of biseqblk
- binsertblk: insert a memory block into a bstring at a position
- bjoinblk: join a bstrList with a memory block separator

binsert and bjoin are refactored as thin wrappers around their blk
counterparts. biseqcaseless is similarly refactored to delegate to
biseqcaselessblk.

New Static macros added to bstrlib.h:
- bcatStatic, bfromStatic, bassignStatic
- binsertStatic, bjoinStatic
- biseqStatic, bisstemeqStatic
- biseqcaselessStatic, bisstemeqcaselessStatic

Novel unit tests added for all four new functions (core_047 through
core_050). The rest of the changeset is adapted from code by Paul Hsieh.
@sonarqubecloud

Copy link
Copy Markdown

@rdmark
rdmark merged commit fe51203 into main Mar 2, 2026
19 checks passed
@rdmark
rdmark deleted the biseqblk-etc branch March 2, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant