FIND YOUR NEXT FEW LINES

Results for “library”

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

653 snippets foundClear filters
PythonGetting Started

Repeat a fixed number of times

Python: Use a counted loop to print three numbered steps.

Python✓ Tested
JavaGetting Started

Repeat a fixed number of times

Java: Use a counted loop to print three numbered steps.

Java✓ Tested
GoGetting Started

Repeat a task with a counted loop

Repeat a task with a counted loop using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaText validation & formatting

Repeat text a fixed number of times

Java: Use String.repeat with a nonnegative repetition count.

Java✓ Tested
PythonGetting Started

Repeat while a condition holds

Python: Count down while a positive number remains, updating the loop variable on each iteration.

Python✓ Tested
JavaGetting Started

Repeat while a condition holds

Java: Count down while a positive number remains, updating the loop variable on each iteration.

Java✓ Tested
RustGetting Started

Repeat while a condition holds

Repeat while a condition holds in a complete Rust program using the standard library.

Rust✓ Tested
RustStrings & Unicode

Replace a literal substring

Replace a literal substring in a complete Rust program using the standard library.

Rust✓ Tested
RustTesting & reusable patterns

Replace a value and keep the old value

Replace a value and keep the old value in a complete Rust program using the standard library.

Rust✓ Tested
jQueryInsertion & wrapping

Replace an element while preserving its position

jQuery: replaceWith swaps an entire node.

jQuery✓ Tested
JavaStrings

Replace literal text

Replace all literal matches in a Java string without regular expressions.

Java✓ Tested
GoStrings & text

Replace literal text

Replace literal text using a complete Go program with explicit sample inputs.

Go✓ Tested