Results for “Text validation & formatting”
Small, practical examples. Search by task or narrow things down below.
Increment a counter without an unexpected errexit
Bash Scripts: An assignment avoids the zero-result exit status of a standalone arithmetic post-increment.
Bash Scripts✓ Tested
Insert values into a multiline template
PowerShell: A double-quoted here-string expands variable references.
PowerShell✓ Tested
Inspect a typed conversion error
Inspect a typed conversion error using a complete Go program with explicit sample inputs.
Go✓ Tested
Inspect a URI through typed properties
PowerShell: The Uri class separates URL components without manual string splitting.
PowerShell✓ Tested
Inspect structured data with JsonPipe
Inspect structured data with JsonPipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Isolate a value with a different writing direction
HTML: Bdi isolates embedded user text so its direction does not reorder surrounding punctuation.
HTML✓ Tested
Join lines from two files side by side
Linux Commands: Use paste to pair lines by position with a chosen separator.
Linux Commands✓ Tested
Join several strings with a separator
PowerShell: The join operator returns one string from an input collection.
PowerShell✓ Tested
Join words with a separator
Join words with a separator using a complete Go program with explicit sample inputs.
Go✓ Tested
Keep a serial message in flash memory
Arduino / C: The F macro keeps a literal out of scarce SRAM.
Arduino / C✓ Tested
Keep function-local assignments separate from caller state
PowerShell: Ordinary function assignments create local variables rather than replacing the caller’s variable.
PowerShell✓ Tested
List files containing a match
Linux Commands: Use grep -l when only the matching filenames are needed.
Linux Commands✓ Tested