INNER CODE UNIT · Dart

toInteger

Ephenodrom/Dart-Basic-Utils · lib/src/BooleanUtils.dart:230

  static int toInteger(final bool bool) {
    return bool ? 1 : 0;
  }

  /// Converts a boolean to a String returning one of the input Strings.
  ///
  ///   BooleanUtils.toBooleanString(true)   = "true"
  ///   BooleanUtils.toBooleanString(false)  = "false"
  static String toBooleanString(final bool value) {
    return value ? TRUE : FALSE;
  }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…