From a9c032a323aadefdfefa0cc0ab35fdd7a2a81850 Mon Sep 17 00:00:00 2001 From: Alfarih Faza Date: Sat, 15 Jan 2022 07:57:31 +0700 Subject: [PATCH] feat: added String ToStringPtr --- string.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/string.go b/string.go index 18180ca..6cb8dd9 100644 --- a/string.go +++ b/string.go @@ -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) {