mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler/vlib: replace substr/left/right with [start..end] everywhere
This commit is contained in:
committed by
Alexander Medvednikov
parent
ed55826686
commit
59378dce46
@@ -141,10 +141,10 @@ pub fn parse_int(_s string, base int, _bit_size int) i64 {
|
||||
// Pick off leading sign.
|
||||
mut neg := false
|
||||
if s[0] == `+` {
|
||||
s = s.right(1)
|
||||
s = s[1..]
|
||||
} else if s[0] == `-` {
|
||||
neg = true
|
||||
s = s.right(1)
|
||||
s = s[1..]
|
||||
}
|
||||
|
||||
// Convert unsigned and check range.
|
||||
|
||||
Reference in New Issue
Block a user