Skip to content

Commit

Permalink
feat: added String ToStringPtr
Browse files Browse the repository at this point in the history
  • Loading branch information
alfarih31 committed Jan 15, 2022
1 parent 1d0b9b1 commit a9c032a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions string.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ func (s String) ToInt() (int, error) {
return strconv.Atoi(string(s))
}

func (s String) ToStringPtr() *string {
return toStringPtr(string(s))
}

// ToBool cast String to represented bool
func (s String) ToBool() (bool, error) {
switch string(s) {
Expand Down

0 comments on commit a9c032a

Please # to comment.