typeprint/typeprint.go

19 lines
285 B
Go
Raw Normal View History

2015-04-27 00:18:53 -04:00
package main
import (
"fmt"
"time"
)
func typeprint(s string) {
for _, j := range s {
if string(j) == "\n" {
fmt.Printf("\n")
} else {
fmt.Printf("%c", j)
}
time.Sleep(time.Millisecond * time.Duration(10))
}
}