va
This commit is contained in:
parent
f13ad2d2ce
commit
f6f4edd7bd
3 changed files with 28 additions and 23 deletions
49
test.c
49
test.c
|
|
@ -1,32 +1,35 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void parseH(char *p);
|
||||
void parseL(char *p);
|
||||
int testicolo( void ) {
|
||||
|
||||
char c[] = "qwertyuiopasdfghjkllzxcvbnm123456789mnbvcxzlkjhgfdsapoiuytrewq1234567890";
|
||||
|
||||
for(int a=0;a<1000;a++){
|
||||
parseH(&c);
|
||||
parseL(&c);
|
||||
// printf("%s",c);
|
||||
}
|
||||
|
||||
void testicolo(char *input, char *output) {
|
||||
strcpy(output, input);
|
||||
for (int a = 0; a < 1000; a++) {
|
||||
parseH(output);
|
||||
parseL(output);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void parseH(char *p) {
|
||||
int ln = strlen(p);
|
||||
for (int a = 0; a < ln; a++) {
|
||||
if (p[a] < 123 && p[a] > 96) {
|
||||
p[a] = p[a] - 32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void parseL(char *p) {
|
||||
int ln = strlen(p);
|
||||
for (int a = 0; a < ln; a++) {
|
||||
if (p[a] < 91 && p[a] > 64) {
|
||||
p[a] = p[a] + 32;
|
||||
|
||||
void parseH(char *p){
|
||||
int ln=strlen(p);
|
||||
for(int a=0; a<ln; a++){
|
||||
if(p[a]<123 && p[a]>96){
|
||||
p[a]=p[a]-32;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void parseL(char *p){
|
||||
int ln=strlen(p);
|
||||
for(int a=0; a<ln; a++){
|
||||
if(p[a]<91 && p[a]>64){
|
||||
p[a]=p[a]+32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue