Results for “Text validation & parsing”
Small, practical examples. Search by task or narrow things down below.
Format a nonnegative integer amount as whole and fractional units
C: Keep the calculation in integer minor units and use two digits for the remainder.
C✓ Tested
Format an integer as padded hexadecimal
Format an integer as padded hexadecimal in a complete Rust program using the standard library.
Rust✓ Tested
Format an integer into a caller-owned buffer
C++: to_chars avoids allocation and reports whether the buffer was large enough.
C++✓ Tested
Format several integers in a fixed buffer
Arduino / C: snprintf limits writes to the buffer size and includes a terminating null byte.
Arduino / C✓ Tested
Handle a failed string-to-integer conversion
C++: stoi throws invalid_argument when no conversion can be performed.
C++✓ Tested
Identify the title of a cited work
HTML: Cite marks the title of a work rather than the name of its author.
HTML✓ 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
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 rows in a chosen order
Aggregate text with STRING_AGG and WITHIN GROUP.
STRING_AGG✓ Tested