Skip to content

Commit

Permalink
fix find_between, when not found return ''
Browse files Browse the repository at this point in the history
  • Loading branch information
kbkpbot committed Jun 12, 2024
1 parent 47e93d1 commit e811cb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/builtin/string.v
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ pub fn (s string) find_between(start string, end string) string {
val := s[start_pos + start.len..]
end_pos := val.index_(end)
if end_pos == -1 {
return val
return ''
}
return val[..end_pos]
}
Expand Down

0 comments on commit e811cb6

Please sign in to comment.