go语言去空格

法一:str = strings.Replace(str, " ", "", -1)

法二:str = strings.Replace(str, "\x00", "", -1)

你可能感兴趣的:(golang,golang)