@@ -28,27 +28,6 @@ while (++tmp < 255)
28
28
dprintf (1 , "\t\x1b[31mKO\x1b[0m\n" );
29
29
}
30
30
31
- /*
32
- **************************** is_isupper ****************************************
33
- */
34
-
35
- dprintf (1 , "\n\x1b[32mft_isupper:\x1b[0m\n" );
36
- dprintf (1 , "\t%c -> %d\n" , '!' , ft_isupper ('!' ));
37
- dprintf (1 , "\t%c -> %d\n" , '@' , ft_isupper ('@' ));
38
- dprintf (1 , "\t%c -> %d\n" , 'A' , ft_isupper ('A' ));
39
- dprintf (1 , "\t%c -> %d\n" , 'F' , ft_isupper ('F' ));
40
- dprintf (1 , "\t%c -> %d\n" , 'K' , ft_isupper ('K' ));
41
- dprintf (1 , "\t%c -> %d\n" , 'T' , ft_isupper ('T' ));
42
- dprintf (1 , "\t%c -> %d\n" , 'Z' , ft_isupper ('Z' ));
43
- dprintf (1 , "\t%c -> %d\n" , '[' , ft_isupper ('[' ));
44
- dprintf (1 , "\t%c -> %d\n" , '`' , ft_isupper ('`' ));
45
- dprintf (1 , "\t%c -> %d\n" , 'a' , ft_isupper ('a' ));
46
- dprintf (1 , "\t%c -> %d\n" , 'f' , ft_isupper ('f' ));
47
- dprintf (1 , "\t%c -> %d\n" , 'k' , ft_isupper ('k' ));
48
- dprintf (1 , "\t%c -> %d\n" , 't' , ft_isupper ('t' ));
49
- dprintf (1 , "\t%c -> %d\n" , 'z' , ft_isupper ('z' ));
50
- dprintf (1 , "\t%c -> %d\n" , '{' , ft_isupper ('{' ));
51
- dprintf (1 , "\t%c -> %d\n" , '~' , ft_isupper ('~' ));
52
31
53
32
/*
54
33
**************************** is_islower ****************************************
@@ -273,5 +252,43 @@ dprintf(1, "\n\x1b[32mft_strdup:\x1b[0m\n");
273
252
str2 = ft_strdup (str );
274
253
dprintf (1 , "\t'%s' <- str2 = ft_strdup(str)\n" , str2 );
275
254
255
+
256
+ /*
257
+ **************************** is_isupper ****************************************
258
+ */
259
+
260
+ dprintf (1 , "\n\x1b[32mft_isupper:\x1b[0m\n" );
261
+
262
+ tmp = 31 ;
263
+ while (++ tmp < 127 )
264
+ {
265
+ dprintf (1 , "\t%c -> %d" , tmp , check = ft_isupper (tmp ));
266
+ if ((check && (64 < tmp && tmp < 91 )) || (!check && (65 > tmp || tmp > 90 )))
267
+ dprintf (1 , "\t\x1b[32mOK\x1b[0m\n" );
268
+ else
269
+ dprintf (1 , "\t\x1b[31mKO\x1b[0m\n" );
270
+ }
271
+
272
+ /*
273
+ **************************** ft_rand *******************************************
274
+ */
275
+ /*
276
+ int rng[100];
277
+ ft_bzero(rng, 100);
278
+ tmp = -1;
279
+ int b;
280
+ while (++tmp < 50)
281
+ {
282
+ b = ft_rand();
283
+ rng[b] += 1;
284
+ }
285
+ tmp = -1;
286
+ while (++tmp < 100)
287
+ {
288
+ dprintf(1, "\tft_rand() value: %d count: %d\n", tmp, rng[tmp]);
289
+ }
290
+ */
291
+ // dprintf(1, "\tft_rand() -> %d", ft_rand());
292
+
276
293
return (0 );
277
294
}
0 commit comments