Revert "builtin: make string.(left|right) pub (#8245)"

This reverts commit 820e684313.
pull/8269/head
Alexander Medvednikov 2021-01-22 10:09:31 +01:00
parent 72168cd6bc
commit 5815d96418
1 changed files with 2 additions and 2 deletions

View File

@ -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 ''
}