| 1 |
/* |
| 2 |
* Copyright © 2024 Pierre Le Marre <[email protected]> |
| 3 |
* SPDX-License-Identifier: MIT |
| 4 |
*/ |
| 5 |
#pragma once |
| 6 |
|
| 7 |
#include "config.h" |
| 8 |
|
| 9 |
#include <stddef.h> |
| 10 |
#include <stdint.h> |
| 11 |
|
| 12 |
char * |
| 13 |
strip_lines(const char *input, size_t input_length, const char *prefix); |
| 14 |
|
| 15 |
char * |
| 16 |
uncomment(const char *input, size_t input_length, const char *prefix); |
| 17 |
|
| 18 |
struct text_line { |
| 19 |
const char *start; |
| 20 |
size_t length; |
| 21 |
}; |
| 22 |
|
| 23 |
size_t |
| 24 |
split_lines(const char *input, size_t input_length, |
| 25 |
struct text_line *output, size_t output_length); |
| 26 |
|
| 27 |
size_t |
| 28 |
concat_lines(struct text_line *lines, size_t length, |
| 29 |
const char *sep, char *output); |
| 30 |
|
| 31 |
size_t |
| 32 |
shuffle_lines(struct text_line *lines, size_t length, char *output); |