I have an array I want to check the the last digits if it is in the array.
Example:
String[] types = {".png",".jpg",".gif"}
String image = "beauty.jpg";
// Note that this is wrong. The parameter required is a string not an array.
Boolean true = image.endswith(types);
Please note: I know I can check each individual item using a for loop.
I want to know if there is a more efficient way of doing this. Reason being is that image string is already on a loop on a constant change.