package main
import (
"fmt"
"strings"
)
func main() {
str := "The Go Programming Language"
// Remove all spaces from the string
strWithoutSpaces := strings.ReplaceAll(str, " ", "")
length := len(strWithoutSpaces)
fmt.Println("Length without spaces:", length)
}
/*
run:
Length without spaces: 24
*/