1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Replace le and ge by lt and gt in compare_strings to have the excepted behavior of the function

This commit is contained in:
Aurélien Foucault 2019-06-23 18:00:29 +02:00 committed by Alex Medvednikov
parent 13f5429dae
commit b6948ad9af

View File

@ -568,10 +568,10 @@ fn (s string) trim_right(cutset string) string {
// //C.printf("tid = %08x \n", pthread_self());
// }
fn compare_strings(a, b *string) int {
if a.le(b) {
if a.lt(b) {
return -1
}
if a.ge(b) {
if a.gt(b) {
return 1
}
return 0