forked from 131/lab3_test
initial commit
This commit is contained in:
21
str_bin.c
Normal file
21
str_bin.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <stdio.h>
|
||||
#include "str_lib.h"
|
||||
|
||||
int
|
||||
main(int argc, const char *argv[])
|
||||
{
|
||||
const char *s1 = "hello";
|
||||
const char *s2 = "ello";
|
||||
|
||||
if (argc > 2) {
|
||||
s1 = argv[1];
|
||||
s2 = argv[2];
|
||||
}
|
||||
|
||||
// binary for manual testing
|
||||
printf("\033[1;30mUse str_test for actual testing\033[0m\n");
|
||||
|
||||
printf("mystrlen(\"%s\") == %d\n", s1, mystrlen(s1));
|
||||
printf("str_idx(\"%s\", \"%s\") == %d\n", s1, s2, mystr_idx(s1, s2));
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user