From 1fabb7d5a653a8743e1cbab24e61c9b6cbff06f3 Mon Sep 17 00:00:00 2001 From: yuyi Date: Wed, 29 Apr 2020 19:51:42 +0800 Subject: [PATCH] checker: fix string.str() error --- vlib/builtin/string.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlib/builtin/string.v b/vlib/builtin/string.v index efc6c63c13..85d728c8b4 100644 --- a/vlib/builtin/string.v +++ b/vlib/builtin/string.v @@ -951,6 +951,10 @@ pub fn (s mut []string) sort_by_len() { s.sort_with_compare(compare_strings_by_len) } +pub fn (s string) str() string { + return s +} + pub fn (s ustring) str() string { return s.s }