EMLib/main.c
2019-02-23 13:03:12 +01:00

27 lines
712 B
C

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "EMsprintf.h"
#include "EMstrcpy.h"
#include "EMstrncpy.h"
#include "EMatoi.h"
int main(int argc, char **argv)
{
char buf[50] = "Une jolie semaine de fevrier", buf_cpy[60] = "";
EMsprintf(buf,"Le %s a %s %d %s %d!!!","loup","egorge", -7895,"agneaux", EMatoi("666"));
/* printf("$%d$\n",EMatoi("000-580"));
printf("#%d#\n",atoi("000580"));*/
EMstrcpy(buf_cpy,buf);
printf("%s\n%s\n",buf,buf_cpy);
EMstrncpy(buf_cpy,buf,strlen(buf));
printf("%s\n#%s#\n",buf,buf_cpy);
/*int16_t mx_int = 0;
printf("Max int : %d, sizeof() : %d", (mx_int | 1 << 15), sizeof(mx_int));*/
return 0;
}