FIND YOUR NEXT FEW LINES

Results for “work”

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

537 snippets foundClear filters
GoJSON & encoding

Read a big-endian integer from bytes

Read a big-endian integer from bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
RustThreads & shared ownership

Read a channel until all senders close

Read a channel until all senders close in a complete Rust program using the standard library.

Rust✓ Tested
jQueryText & attributes

Read a data attribute

Read an element data attribute with jQuery data.

jQuery✓ Tested
GitCommits & history

Read a file from a commit

Inspect committed content without changing your working copy.

show✓ Tested
Bash ScriptsLoops & decisions

Read a file without losing its last line

Handle spaces, backslashes, and a final line without a newline.

read lines✓ Tested
GoTesting & reusable helpers

Read a fixed-size stream prefix

Read a fixed-size stream prefix using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Data & dates

Read a JSON property

Parse a JSON document and dispose it after reading in C#.

C#✓ Tested
Bash ScriptsGetting Started

Read a line without losing backslashes

Bash Scripts: Read a line without losing backslashes with a small standalone Bash program.

Bash Scripts✓ Tested
RustParsing & byte data

Read a little-endian integer from bytes

Read a little-endian integer from bytes in a complete Rust program using the standard library.

Rust✓ Tested
GoHTTP & URLs

Read a named request cookie

Read a named request cookie using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsParameter expansion

Read a string’s character length

Bash Scripts: Bash parameter length counts characters under the current locale.

Bash Scripts✓ Tested
C#Files & paths

Read a text file

Load a small text file into a C# string.

C#✓ Tested