mirror of https://github.com/gobeam/stringy.git
parent
b092f52a1b
commit
10c11b1426
|
@ -337,8 +337,8 @@ LcFirst simply returns result by lower casing first letter of string and it can
|
||||||
Prefix makes sure string has been prefixed with a given string and avoids adding it again if it has.
|
Prefix makes sure string has been prefixed with a given string and avoids adding it again if it has.
|
||||||
|
|
||||||
```go
|
```go
|
||||||
ufo := stringy.New("known flying object")
|
ufo := stringy.New("known flying object")
|
||||||
fmt.Println(ufo.Prefix("un")) // unknown flying object
|
fmt.Println(ufo.Prefix("un")) // unknown flying object
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -347,8 +347,8 @@ fmt.Println(ufo.Prefix("un")) // unknown flying object
|
||||||
Suffix makes sure string has been suffixed with a given string and avoids adding it again if it has.
|
Suffix makes sure string has been suffixed with a given string and avoids adding it again if it has.
|
||||||
|
|
||||||
```go
|
```go
|
||||||
pun := stringy.New("this really is a cliff")
|
pun := stringy.New("this really is a cliff")
|
||||||
fmt.Println(pun.Suffix("hanger")) // this really is a cliffhanger
|
fmt.Println(pun.Suffix("hanger")) // this really is a cliffhanger
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue