mirror of
https://github.com/theoludwig/libcproject.git
synced 2024-11-09 22:08:40 +01:00
Théo LUDWIG
72645da4b2
BREAKING CHANGE: Most of string functions mutates the string instead of copying now. This allows better performance when copy is not needed. It also allows more granual control. If copy is wanted, simply use `string_copy` before calling the function. Impacted functions are: `string_to_uppercase`, `string_to_lowercase`, `string_replace`, `string_trim_start`, `string_trim_end`, `string_trim`, `string_capitalize`, `string_reverse`
12 lines
229 B
C
12 lines
229 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "libcproject.h"
|
|
|
|
int main() {
|
|
string_t string = "Hello, world!";
|
|
printf("%s\n", string);
|
|
printf("string_length = %ld\n", string_get_length(string));
|
|
return EXIT_SUCCESS;
|
|
}
|