golang中的字符串操作strings.Trim

package main

import (
        "fmt"
        "strings"

)

//golang字符串操作
func main(){
        s := "Hello world hello world"
        str := "world"
        //var s = []string{"11","22","33"}

        //删除s首尾连续的包含在str中的字符
        ret := strings.Trim(s,str)
        fmt.Println(ret) //Hello world hello

}