1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-12-08 00:45:29 +01:00
programming-challenges/challenges/slugify/solutions/c/function/solution.c
2021-11-10 20:09:01 +01:00

18 lines
358 B
C

#include <stdio.h>
#include <stdlib.h>
#include "character.h"
#include "input.h"
#include "string.h"
int main() {
char* string = input();
string = string_trim(string, ' ');
string = string_trim(string, '-');
string = string_to_lowercase(string);
string = string_slugify(string);
printf("%s\n", string);
free(string);
return EXIT_SUCCESS;
}