int main() {
printf("Testing Edge Cases:\n\n");
printf("1. Empty string operations:\n");
char *empty = "";
char *result1 = upper(empty);
printf("upper('') = '%s'\n", result1);
printf("\n2. String slicing edge cases:\n");
char *text = "Hello";
char *slice1 = text[0:0];
printf("'Hello'[0:0] = '%s'\n", slice1);
char *slice2 = text[10:20];
printf("'Hello'[10:20] = '%s'\n", slice2);
char *slice3 = text[3:3];
printf("'Hello'[3:3] = '%s'\n", slice3);
printf("\n3. Math with edge cases:\n");
int zero = 0;
printf("abs(0) = %d\n", abs(zero));
printf("sqrt(0) = %d\n", sqrt(zero));
printf("\n4. String concatenation:\n");
char *str1 = "A";
char *str2 = "B";
char *concat = str1 + str2;
printf("'A' + 'B' = '%s'\n", concat);
printf("\n5. String search edge cases:\n");
int pos1 = strpos("test", "xyz");
printf("strpos('test', 'xyz') = %d\n", pos1);
int pos2 = strpos("test", "test");
printf("strpos('test', 'test') = %d\n", pos2);
printf("\n6. Nested operations:\n");
char *nested = upper(lower(upper("TeSt")));
printf("upper(lower(upper('TeSt'))) = '%s'\n", nested);
printf("\nAll edge cases handled safely!\n");
return 0;
}