]> Kevux Git Server - fll/commit
Feature: Add f_string_dynamic_strip_null() and f_string_dynamic_strip_null_range().
authorKevin Day <thekevinday@gmail.com>
Tue, 16 Jan 2024 14:22:03 +0000 (08:22 -0600)
committerKevin Day <thekevinday@gmail.com>
Tue, 16 Jan 2024 14:22:03 +0000 (08:22 -0600)
commit986ce6e71e150f385896d489b89e72d3c2e42f28
treebc45dd8266d430c3f69e496d15832c781edafe44
parente2c627a7fc573249d92f2b174071a91dd708080d
Feature: Add f_string_dynamic_strip_null() and f_string_dynamic_strip_null_range().

The ability to strip out NULLs from a given string as a common function is needed.

Provide two similar but different functions.
The f_string_dynamic_strip_null() moves the NULLs to the end of the string and the shrinks the string used length as appropriate.
The f_string_dynamic_strip_null_range() shifts all of the NULLs found to the end of the given range without modifying the array used length.

Unit tests are added.

Only basic logic is applied and so there is no especially focused optimization in the parsing logic.
level_0/f_string/c/string/dynamic.c
level_0/f_string/c/string/dynamic.h
level_0/f_string/data/build/settings-tests
level_0/f_string/tests/unit/c/test-string-dynamic_strip_null.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamic_strip_null.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamic_strip_null_range.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamic_strip_null_range.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string.c
level_0/f_string/tests/unit/c/test-string.h