jaunes
This commit is contained in:
24
HolidayTrip/Fundamentals/my_strings/main.c
Normal file
24
HolidayTrip/Fundamentals/my_strings/main.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "my_strings.h"
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
// struct string *str = my_str_init("Hello World!", 12);
|
||||
// printf("data: %.*s\n", (int)str->size, str->data);
|
||||
|
||||
|
||||
//struct string *str = my_str_init("Hello World!", 12);
|
||||
//my_str_destroy(str);
|
||||
|
||||
//struct string *str = my_str_init("Hello Alien World!", 18);
|
||||
//my_str_puts(str);
|
||||
// my_str_destroy(str);
|
||||
|
||||
struct string *str = my_str_init("Hello ", 6);
|
||||
str = my_str_n_cat(str, "Alien World!", 13);
|
||||
my_str_puts(str);
|
||||
my_str_destroy(str);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user