Skip to content

strextract fails if search start is the same as the input string #49

@mdbartos

Description

@mdbartos

The current code for strextract assumes the search start is shorter than the length of the input string.

If we want to extract a substring starting at the beginning of a string, we might want to use the input string as the search start string. However, this doesn't work for the current implementation due to:

        begin += strlen(search_start);

I can see reasons for both implementations; maybe we could include an argument that specifies the desired behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions