Skip to content

Find and Replace text in c #1

@0xwal

Description

@0xwal

Find and Replace Text

Description:

We need to write a function to replace the first found occurrence

in the input with the given replacement text.

Details:

Header:

src/include/string_replace.h

Source file:

src/string_replace.c

Test file:

tests/string_replace.test.cpp

Signature:

char* string_replace_first_occurence(const char* text, const char* replacement, const char* input);

Restriction:

  • Do not use any builtin string functions.
  • Only allowed to use memory functions ex: malloc, calloc, etc.

Note:

See Contribution Guide for more details.

Let me know if you are unable to write the tests, I will do that for you.

Also if you want any help let me know 😉.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions