package strfun;
public class strfun1 {
public static String reverseString(String input) {
if (input == null) {
throw new IllegalArgumentException("Input string cannot be null");
}
StringBuilder reversed = new StringBuilder(input);
return [Link]().toString();
}
public static boolean isPalindrome(String input) {
if (input == null) {
throw new IllegalArgumentException("Input string cannot be null");
}
String reversed = reverseString(input);
return [Link](reversed);
}
public static String toUpperCase(String input) {
if (input == null) {
throw new IllegalArgumentException("Input string cannot be null");
}
return [Link]();
}
public static String concatenate(String str1, String str2) {
if (str1 == null || str2 == null) {
throw new IllegalArgumentException("Neither string can be null");
}
return str1 + str2;
}
public static boolean containsSubstring(String str, String substring) {
if (str == null || substring == null) {
throw new IllegalArgumentException("Neither string can be null");
}
return [Link](substring);
}
public static String trimWhitespace(String str) {
if (str == null) {
throw new IllegalArgumentException("Input string cannot be null");
}
return [Link]();
}
}