builtin: cleanup obsolete function in string.v and array.v (#19451)

This commit is contained in:
yuyi 2023-09-28 00:49:33 +08:00 committed by GitHub
parent 981f76cd04
commit ec30256c7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 15 deletions

View file

@ -1027,13 +1027,6 @@ pub fn (s string) split_into_lines() []string {
return res
}
// used internally for [2..4]
[inline]
fn (s string) substr2(start int, _end int, end_max bool) string {
end := if end_max { s.len } else { _end }
return s.substr(start, end)
}
// substr returns the string between index positions `start` and `end`.
// Example: assert 'ABCD'.substr(1,3) == 'BC'
[direct_array_access]