1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-07-15 01:25:00 +02:00

RIGHT() function should return substr counting from right rather than… (#164)

This commit is contained in:
kiinoo
2018-11-07 23:04:18 +08:00
committed by Tim Voronov
parent 409a517e87
commit 528b60df24
2 changed files with 7 additions and 6 deletions

View File

@ -105,5 +105,5 @@ func Right(_ context.Context, args ...core.Value) (core.Value, error) {
return values.NewString(string(text)), nil
}
return values.NewStringFromRunes(runes[pos:size]), nil
return values.NewStringFromRunes(runes[size-pos : size]), nil
}