FIND YOUR NEXT FEW LINES

Results for “read”

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

477 snippets foundClear filters
Arduino / CSerial protocols

Inspect a byte without consuming it

Arduino / C: peek leaves the next byte available for a later read.

Arduino / C✓ Tested
C++Text validation & parsing

Inspect a substring without allocating a copy

C++: A string_view refers to existing storage and must not outlive that storage.

C++✓ Tested
C++Text validation & parsing

Iterate over all regular-expression matches

C++: A regex iterator yields successive matches without manually updating an offset.

C++✓ Tested
JavaScriptObjects & JSON

Iterate over object entries

Read JavaScript property names and values using Object.entries.

JavaScript✓ Tested
PythonStrings & dates

Join strings with a separator

Combine a list of strings into one readable string with a separator between each item.

string✓ Tested
SQLExpressions & aggregates

Label rows with CASE

Derive a readable label from a condition.

CASE✓ Tested
GitInspecting the working tree

List files tracked by Git

Git: ls-files reads the index instead of listing every file in the working directory.

Git✓ Tested
C++Filesystem operations

List regular files recursively in sorted order

C++: Collect relative paths before sorting because directory iteration order is unspecified.

C++✓ Tested
GitMerging & replaying changes

List the paths with unresolved merge conflicts

Git: The U diff filter identifies unmerged entries without parsing human-readable status output.

Git✓ Tested
JavaFile operations & binary data

Load a small properties configuration

Java: Use a Reader to make the configuration character encoding explicit.

Java✓ Tested
C++Collections

Look up a map key

Use find to read a C++ map without inserting a missing key.

C++✓ Tested
Arduino / CData & storage

Map an input range to an output range

Scale an integer reading to a different interval.

map✓ Tested