Login
|
Signup
langref.org
-
go
add..
all
clojure
cpp
csharp
erlang
fantom
fsharp
groovy
haskell
java
ocaml
perl
php
python
ruby
scala
Home
All
Solved
Unsolved
Strings
Numbers
Regex
Lists
Maps
Structure
Files
Dates
OOP
Networking
XML
Algorithms
Misc
Parallel
View Problem
Strings
Manipulation
Remove leading and trailing whitespace from a string
Given the string
" hello "
return the string
"hello"
.
go
s := strings.TrimSpace(" hello ")
package main
import "fmt"
import "strings"
func main() {
s := strings.TrimSpace(" hello ")
}
Submit a new solution for
go
There are 21 other solutions in
additional
languages (
clojure
,
cpp
,
csharp
,
erlang
...)