FIND YOUR NEXT FEW LINES

Results for “File operations & integrity”

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

947 snippets foundClear filters
PowerShellFunctions & parameter validation

Enforce a numeric range at a function boundary

PowerShell: ValidateRange performs argument validation before work begins.

PowerShell✓ Tested
PowerShellHashtables & object records

Enumerate hashtable entries in a stable order

PowerShell: Sort entries by key when predictable output matters.

PowerShell✓ Tested
PowerShellStructured formats & encodings

Escape a single URL parameter value

PowerShell: EscapeDataString encodes one value without treating it as a complete URL.

PowerShell✓ Tested
PowerShellStructured formats & encodings

Escape plain text before placing it in HTML

PowerShell: HtmlEncode converts HTML delimiters to entities in ordinary text contexts.

PowerShell✓ Tested
RustTesting & reusable patterns

Exercise a function with a table of inputs

Exercise a function with a table of inputs in a complete Rust program using the standard library.

Rust✓ Tested
SQLiteJSON data

Expand a JSON array into rows

Iterate array elements using a table-valued function.

json_each✓ Tested
RustNumbers & durations

Express a duration in milliseconds

Express a duration in milliseconds in a complete Rust program using the standard library.

Rust✓ Tested
SQLiteJSON data

Extract a JSON field

Read a scalar value from JSON text.

json_extract✓ Tested
PowerShellStrings & literal text

Extract a known substring

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

PowerShell✓ Tested
GoHTTP & URLs

Extract a route path variable

Extract a route path variable using a complete Go program with explicit sample inputs.

Go✓ 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