From d925a453beedc1ac6935185da91c450056eb5c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 3 Jul 2023 15:59:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BD=AC=E6=8D=A2=E6=88=90?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- string.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/string.go b/string.go index aa244df..2ea0012 100644 --- a/string.go +++ b/string.go @@ -474,6 +474,19 @@ func (str String) ToBoolPtr() BoolPtrResult { } } +// ToStringPtr 转换成字符串指针 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 15:57 2023/7/3 +func (str String) ToStringPtr() StringPtrResult { + val := str.Value() + return StringPtrResult{ + Value: &val, + Err: nil, + } +} + // ToObject ... // // Author : go_developer@163.com<白茶清欢>