FIND YOUR NEXT FEW LINES

Results for “then”

Small, practical examples. Search by task or narrow things down below.

703 snippets foundClear filters
RustParsing & byte data

Format an integer as padded hexadecimal

Format an integer as padded hexadecimal in a complete Rust program using the standard library.

Rust✓ Tested
C++Numeric parsing & calculations

Format an integer into a caller-owned buffer

C++: to_chars avoids allocation and reports whether the buffer was large enough.

C++✓ Tested
C++Numbers & algorithms

Format decimal output

Use fixed and setprecision to print two C++ decimal places.

C++✓ Tested
AngularPipes & formatting

Format text in lowercase

Format text in lowercase with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Format text through a built-in pipe

Format text through a built-in pipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptUTC date operations

Format whole seconds as hours minutes and seconds

TypeScript: Use integer divisions and remainders for a nonnegative duration.

TypeScript✓ Tested
CSmall algorithms & bit operations

Generate a bounded Fibonacci sequence

C: Keep only the two previous values instead of using exponential recursive calls.

C✓ Tested
TypeScriptArray restructuring

Generate a bounded integer range

TypeScript: Array.from supplies each output position to its mapping function.

TypeScript✓ Tested
CStructures & function interfaces

Give a reusable record type a short name

C: A typedef names a structure type without changing its representation.

C✓ Tested
TypeScriptTypes & functions

Give an optional property a default

Handle missing object fields with nullish coalescing.

optional✓ Tested
C++Ordering & set operations

Group matching values while preserving their order

C++: stable_partition keeps the relative order within both predicate groups.

C++✓ Tested
TypeScriptObject behavior & collections

Group records into map entries

TypeScript: Initialize an array for a missing Map key before appending its values.

TypeScript✓ Tested