-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_test.go
More file actions
32 lines (25 loc) · 839 Bytes
/
Copy pathexample_test.go
File metadata and controls
32 lines (25 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package sfmt_test
import (
"fmt"
"github.com/WnP/go-sfmt"
)
func ExampleCamelCased() {
fmt.Println(sfmt.CamelCased("The_quick_brown_fox_jumps_over_the_lazy_dog"))
// Output: theQuickBrownFoxJumpsOverTheLazyDog
}
func ExampleDashed() {
fmt.Println(sfmt.Dashed("The quick brown fox jumps over the lazy dog"))
// Output: the-quick-brown-fox-jumps-over-the-lazy-dog
}
func ExampleDoted() {
fmt.Println(sfmt.Doted("The-quick-brown-fox-jumps-over-the-lazy-dog"))
// Output: the.quick.brown.fox.jumps.over.the.lazy.dog
}
func ExampleSpaced() {
fmt.Println(sfmt.Spaced("The.quick.brown.fox.jumps.over.the.lazy.dog"))
// Output: the quick brown fox jumps over the lazy dog
}
func ExampleUnderscored() {
fmt.Println(sfmt.Underscored("TheQuickBrownFoxJumpsOverTheLazyDog"))
// Output: the_quick_brown_fox_jumps_over_the_lazy_dog
}