xxxxxxxxxx
import (
"fmt"
"strings"
)
func main() {
// Using Trim() function
res1 := strings.Trim(str1, "!")
res2 := strings.Trim(str2, "@$")
// Displaying the results
fmt.Println("\nStrings after trimming:")
fmt.Println("Result 1: ", res1)
fmt.Println("Result 2:", res2)
}