Results for “tr”
Small, practical examples. Search by task or narrow things down below.
Convert text without raising a conversion error
Return NULL when a numeric conversion fails.
TRY_CONVERT✓ Tested
Copy a file in bounded binary chunks
C: Check read, write, and close errors while copying without loading the entire file.
C✓ Tested
Copy a file into a created container
Docker / Compose: docker cp can copy into a container before its process starts.
Docker / Compose✓ Tested
Copy a range without changing the source
JavaScript: Array.slice returns a shallow copy of the selected half-open range.
JavaScript✓ Tested
Copy a range without changing the source
TypeScript: Array.slice returns a shallow copy of the selected half-open range.
TypeScript✓ Tested
Count a leading run of allowed characters
C: strspn counts bytes at the start that belong to a specified character set.
C✓ Tested
Count bytes in a file
Linux Commands: Use wc -c for byte length rather than Unicode character count.
Linux Commands✓ Tested
Count commits unique to each of two branches
Git: The symmetric difference with left-right separates commits reachable from only one side.
Git✓ Tested
Count whitespace-separated words
Linux Commands: Use wc -w with standard input to omit the filename column.
Linux Commands✓ Tested
Create a branch from a known release tag
Git: A named starting revision makes the branch’s initial commit explicit.
Git✓ Tested
Create a modified copy of an immutable record
C#: A with expression creates a shallow copy with selected changed properties.
C#✓ Tested
Create a reusable one-to-many lookup
C#: ToLookup groups values by key and returns an empty sequence for an unknown key.
C#✓ Tested