Results for “library”
Small, practical examples. Search by task or narrow things down below.
Repeat a fixed number of times
Python: Use a counted loop to print three numbered steps.
Python✓ Tested
Repeat a fixed number of times
Java: Use a counted loop to print three numbered steps.
Java✓ Tested
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
Repeat text a fixed number of times
Java: Use String.repeat with a nonnegative repetition count.
Java✓ Tested
Repeat while a condition holds
Python: Count down while a positive number remains, updating the loop variable on each iteration.
Python✓ Tested
Repeat while a condition holds
Java: Count down while a positive number remains, updating the loop variable on each iteration.
Java✓ Tested
Repeat while a condition holds
Repeat while a condition holds in a complete Rust program using the standard library.
Rust✓ Tested
Replace a literal substring
Replace a literal substring in a complete Rust program using the standard library.
Rust✓ Tested
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
Replace an element while preserving its position
jQuery: replaceWith swaps an entire node.
jQuery✓ Tested
Replace literal text
Replace all literal matches in a Java string without regular expressions.
Java✓ Tested
Replace literal text
Replace literal text using a complete Go program with explicit sample inputs.
Go✓ Tested