Results for “Text validation & formatting”
Small, practical examples. Search by task or narrow things down below.
Extract a known substring
PowerShell: Substring uses a zero-based starting index and a character count.
PowerShell✓ Tested
Extract a section of an Arduino String
Arduino / C: substring includes the start index and excludes the end index.
Arduino / C✓ Tested
Extract digit sequences
Extract digit sequences using a complete Go program with explicit sample inputs.
Go✓ Tested
Find the number of days in a month
PowerShell: DaysInMonth handles leap-year February correctly.
PowerShell✓ Tested
Format a bounded duration as hours minutes and seconds
PowerShell: TimeSpan can format duration components with escaped separators.
PowerShell✓ Tested
Format a date in an explicit timezone
Format a date in an explicit timezone with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Format a fractional value as a percentage
Format a fractional value as a percentage with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Format a number with fixed decimal places
Format a number with fixed decimal places with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Format a numeric label with leading zeroes
Bash Scripts: Use a constant printf format string and supply values as separate arguments.
Bash Scripts✓ Tested
Format an amount in a selected currency
Format an amount in a selected currency with a standalone Angular component and explicit browser behavior.
Angular✓ 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
Identify the title of a cited work
HTML: Cite marks the title of a work rather than the name of its author.
HTML✓ Tested