Results for “od”
Small, practical examples. Search by task or narrow things down below.
Inspect components of a URI
Java: Use URI parsing instead of splitting a URL at punctuation manually.
Java✓ Tested
Inspect the parsed pieces of a URL
JavaScript: Use URL properties rather than splitting a URL at punctuation.
JavaScript✓ Tested
Inspect the parsed pieces of a URL
TypeScript: Use URL properties rather than splitting a URL at punctuation.
TypeScript✓ Tested
Join string slices
Join string slices in a complete Rust program using the standard library.
Rust✓ Tested
Measure UTF-8 bytes separately from characters
Java: Encode a Java string before measuring its serialized byte length.
Java✓ Tested
Mutate a struct through a pointer receiver
Mutate a struct through a pointer receiver using a complete Go program with explicit sample inputs.
Go✓ Tested
Normalize identifier case consistently
JavaScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.
JavaScript✓ Tested
Normalize identifier case consistently
TypeScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.
TypeScript✓ Tested
Pad a numeric label to a fixed width
C#: Use a numeric format specifier to add leading zeroes.
C#✓ Tested
Parse a UUID and inspect its version
Java: Use UUID.fromString for a standard UUID value.
Java✓ Tested
Preserve a large JSON integer
Preserve a large JSON integer using a complete Go program with explicit sample inputs.
Go✓ Tested
Quote a literal search term for a regex
C#: Regex.Escape prevents metacharacters in a literal term from changing the pattern.
C#✓ Tested