Results for “read-only”
Small, practical examples. Search by task or narrow things down below.
Enumerate Unicode code points
C#: EnumerateRunes combines surrogate pairs into Unicode scalar values.
C#✓ Tested
Escape a URL query value
C#: EscapeDataString percent-encodes one value rather than an entire URL.
C#✓ Tested
Escape text for an HTML context
C#: HtmlEncode converts markup delimiters in plain text before rendering it as HTML content.
C#✓ Tested
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
Explain which ignore rule matches a file
Git: check-ignore -v reports the source file, line, pattern, and matched path.
Git✓ Tested
Export a value to child processes
Bash Scripts: Only exported shell variables are inherited through the environment.
Bash Scripts✓ Tested
Export committed files without the Git metadata directory
Git: Git archive creates a snapshot of tracked committed files only.
Git✓ Tested
Express a duration in milliseconds
Express a duration in milliseconds in a complete Rust program using the standard library.
Rust✓ Tested
Extract a JSON field
Read a scalar value from JSON text.
json_extract✓ Tested
Extract a route path variable
Extract a route path variable using a complete Go program with explicit sample inputs.
Go✓ Tested
Extract a substring with an explicit count
C++: The second substr argument is a length rather than an ending index.
C++✓ Tested
Extract a substring with range syntax
C#: C# range ends are exclusive; indices operate on UTF-16 code units.
C#✓ Tested