Spec-Zone.ru › Dart 2

dart:core

Метод compareTo

int compareTo(
  1. BigInt other
)
override

Сравнивает это значение с other.

Возвращает отрицательное число, если this меньше other, ноль, если они равны, и положительное число, если this больше other.

Пример:

print(BigInt.from(1).compareTo(BigInt.from(2))); // => -1
print(BigInt.from(2).compareTo(BigInt.from(1))); // => 1
print(BigInt.from(1).compareTo(BigInt.from(1))); // => 0

Реализация

int compareTo(BigInt other);

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-core/BigInt/compareTo.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API