How to String Ends With in Groovy - Code Snippet

How to perform 'String Ends With' in Groovy.

example.groovy
// Task: String Ends With
// Language: Groovy

def string_ends_with() {
    // Implementation for String Ends With
    def result = ...; // Initialize variable
    // TODO: Implement core logic here
    // Step 1: Prepare data
    // Step 2: Process String Ends With
    println("Done");
}
AdSense Slot