some string stuff

This commit is contained in:
Mark McGranaghan 2012-09-19 23:20:15 -07:00
parent 47451158c0
commit 68bd574b90
3 changed files with 5 additions and 3 deletions

1
README
View File

@ -61,7 +61,6 @@ gobyexample.com signups
* using gofmt
* scrolls style logging
* range and close http://tour.golang.org/#66
* string replacement - sub & gsub
* benchmarking
* profiling

View File

@ -14,7 +14,8 @@ func main() {
p(strings.Index("test", "e"))
p(strings.Join([]string{"a","b"}, "-"))
p(strings.Repeat("a", 5))
p(strings.Replace("aaaa", "a", "b", 2))
p(strings.Replace("foo", "o", "0", -1))
p(strings.Replace("foo", "o", "0", 1))
p(strings.Split("a-b-c-d-e", "-"))
p(strings.ToLower("TEST"))
p(strings.ToUpper("test"))

View File

@ -13,4 +13,6 @@ func main() {
fmt.Println(r1.MatchString("peach"))
}
// todo more
// == todo
// more
// gsub with regexp