This commit is contained in:
2025-11-24 10:36:08 +01:00
parent 7b836a14bd
commit e92ee90050
16 changed files with 421 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
int to_ascii(char c) {
if (c >= 'A' && c <= 'Z') {
int ascii_A = 65;
int off = ascii_A - 'A';
return c + off;
}
if (c >= 'a' && c <= 'z') {
int ascii_a = 97;
int off = ascii_a - 'a';
return c + off;
}
return -1;
}

View File

@@ -0,0 +1 @@
int to_ascii(char c);

View File

@@ -0,0 +1,4 @@
int to_upper_case(char c) {
if (c >= 'A' && c <= 'Z') return c;
return c - ('a' - 'A');
}

View File

@@ -0,0 +1 @@
int to_upper_case(char c);