Results for “no”
Small, practical examples. Search by task or narrow things down below.
Repeat text a fixed number of times
Java: Use String.repeat with a nonnegative repetition count.
Java✓ Tested
Repeat until a condition becomes true
Bash Scripts: An until loop continues while its test returns a nonzero status.
Bash Scripts✓ Tested
Repeat while a condition holds
JavaScript: Count down while a positive number remains, updating the loop variable on each iteration.
JavaScript✓ Tested
Repeat while a condition holds
TypeScript: Count down while a positive number remains, updating the loop variable on each iteration.
TypeScript✓ Tested
Repeat while a condition holds
PowerShell: Repeat while a condition holds using PowerShell 7.
PowerShell✓ Tested
Replace a literal word in text
PowerShell: Replace a literal word in text using PowerShell 7.
PowerShell✓ Tested
Replace a text file with an atomic rename
Prepare new content beside the target before renaming it into place.
atomic write✓ Tested
Replace all literal matches
Replace repeated substrings with JavaScript replaceAll.
JavaScript✓ Tested
Replace all matching text
Normalize repeated whitespace with a regular expression.
regexp_replace✓ Tested
Replace an array segment in place
JavaScript: splice returns removed items and inserts replacements at the chosen position.
JavaScript✓ Tested
Replace an array segment in place
TypeScript: splice returns removed items and inserts replacements at the chosen position.
TypeScript✓ Tested
Replace an element while preserving its position
jQuery: replaceWith swaps an entire node.
jQuery✓ Tested