From 5815d964183877ba50501e00600eabda5321dd06 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Fri, 22 Jan 2021 10:09:31 +0100 Subject: [PATCH] Revert "builtin: make string.(left|right) pub (#8245)" This reverts commit 820e68431381c47dececca7f43cc4b5612bbe407. --- vlib/builtin/string.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/builtin/string.v b/vlib/builtin/string.v index a897453bdb..42c0ce97eb 100644 --- a/vlib/builtin/string.v +++ b/vlib/builtin/string.v @@ -591,7 +591,7 @@ pub fn (s string) split_into_lines() []string { // left returns the `n`th leftmost characters of the string. // Example: assert 'hello'.left(2) == 'he' -pub fn (s string) left(n int) string { +fn (s string) left(n int) string { if n >= s.len { return s } @@ -600,7 +600,7 @@ pub fn (s string) left(n int) string { // right returns the `n`th rightmost characters of the string. // Example: assert 'hello'.right(2) == 'lo' -pub fn (s string) right(n int) string { +fn (s string) right(n int) string { if n >= s.len { return '' }