FIND YOUR NEXT FEW LINES

Results for “Text validation & parsing”

Small, practical examples. Search by task or narrow things down below.

547 snippets foundClear filters
RustParsing & byte data

Encode an integer as big-endian bytes

Encode an integer as big-endian bytes in a complete Rust program using the standard library.

Rust✓ Tested
PowerShellFunctions & parameter validation

Enforce a numeric range at a function boundary

PowerShell: ValidateRange performs argument validation before work begins.

PowerShell✓ Tested
Linux CommandsSearching text

Exclude matching lines

Linux Commands: Use grep -v to retain lines that do not start with a comment marker.

Linux Commands✓ Tested
PowerShellStrings & literal text

Extract a known substring

PowerShell: Substring uses a zero-based starting index and a character count.

PowerShell✓ Tested
Arduino / CText & bounded buffers

Extract a section of an Arduino String

Arduino / C: substring includes the start index and excludes the end index.

Arduino / C✓ Tested
GoStrings & text

Extract digit sequences

Extract digit sequences using a complete Go program with explicit sample inputs.

Go✓ Tested
SQLiteQueries & text

Extract part of a string

Use one-based positions with substr.

substr✓ Tested
C++Numeric parsing & calculations

Find the greatest common divisor with the standard library

C++: std::gcd computes a nonnegative integer common divisor.

C++✓ Tested
C++Numeric parsing & calculations

Find the least common multiple with the standard library

C++: std::lcm combines positive integer periods into a common cycle.

C++✓ Tested
PowerShellDates & numeric validation

Find the number of days in a month

PowerShell: DaysInMonth handles leap-year February correctly.

PowerShell✓ Tested
PowerShellDates & numeric validation

Format a bounded duration as hours minutes and seconds

PowerShell: TimeSpan can format duration components with escaped separators.

PowerShell✓ Tested
CBinary formats & structured parsing

Format a known timestamp in UTC

C: gmtime converts to UTC calendar fields and strftime formats them.

C✓ Tested