-
Notifications
You must be signed in to change notification settings - Fork 1
/
news.c
56 lines (55 loc) · 1.03 KB
/
news.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "cstring.h"
int main(){
char *d="\ec\e[44;36m";
char *a="hello world.";
char *b="hi.";
char *s1;
char *s3;
char *s2;
char *s4;
char *arr;
char *lst;
print (d);
s2=strString('*',20);
s1=newString(a);
s1=catString(s1,b);
s1=appendString(s1,'*',20);
s1=frontString(s1,'*',20);
replaceCharString(s1,'*',' ');
replaceCharString(s2,'*',' ');
s1=catNString(s1,s2,5);
frees(s2);
s1=catNString(s1,"",0);
s2=replaceString(s1,"world","wr");
s4=lefths(trim(s1),4);
s3=mid(trim(s2),2,4);
arr=newPointer(s4);
arr=addPointer(arr,s3);
printList(arr);
frees(arr);
frees(s3);
frees(s2);
frees(s1);
frees(s4);
s1=newString("arg0,arg1,arg2,arg3,arg4,arg5");
arr=splitString(s1,',');
s2=getItem(arr,2);
setItem(arr,4,s2);
deleteItem(arr,2);
insertItem(arr,1,s2);
lst=cloneList(arr);
printList(lst);
frees(lst);
frees(arr);
frees(s1);
s1=newString("Hello World..");
s2=edit(s1,5,10,'>');
print (s2);
frees(s2);
frees(s1);
s1=newString("Hello ........World..");
deledit(s1,13,8);
print (s1);
frees(s1);
return 0;
}