Results for “then”
Small, practical examples. Search by task or narrow things down below.
Check positive integer addition before performing it
C: Check the upper boundary before adding two known nonnegative integers.
C✓ Tested
Check whether a floating-point value is finite
Check whether a floating-point value is finite in a complete Rust program using the standard library.
Rust✓ Tested
Check whether a future is ready without blocking
C++: A zero-duration wait reports timeout until the producer sets a value.
C++✓ Tested
Check whether a range is already sorted
C++: is_sorted reports ordering without modifying the input.
C++✓ Tested
Check whether a value is a safe integer
TypeScript: Number.isSafeInteger also checks the exact-integer range supported by Number.
TypeScript✓ Tested
Check whether any item matches
TypeScript: some stops once a predicate succeeds.
TypeScript✓ Tested
Check whether every item matches
TypeScript: every stops at the first failed predicate and returns true for an empty array.
TypeScript✓ Tested
Check whether text contains a phrase
Use a case-sensitive Java substring check.
Java✓ Tested
Check whether text ends with a suffix
TypeScript: Use endsWith for a literal case-sensitive ending.
TypeScript✓ Tested
Check whether text starts with a prefix
TypeScript: Use startsWith for a literal case-sensitive prefix comparison.
TypeScript✓ Tested
Choose an action with match
Choose an action with match in a complete Rust program using the standard library.
Rust✓ Tested
Choose an equality function for signal values
Choose an equality function for signal values with a standalone Angular component and explicit browser behavior.
Angular✓ Tested