FIND YOUR NEXT FEW LINES

Results for “read file”

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

1171 snippets foundClear filters
RustStrings & Unicode

Replace a literal substring

Replace a literal substring in a complete Rust program using the standard library.

Rust✓ Tested
PowerShellGetting Started

Replace a literal word in text

PowerShell: Replace a literal word in text using PowerShell 7.

PowerShell✓ Tested
RustTesting & reusable patterns

Replace a value and keep the old value

Replace a value and keep the old value in a complete Rust program using the standard library.

Rust✓ Tested
GoStrings & text

Replace literal text

Replace literal text using a complete Go program with explicit sample inputs.

Go✓ Tested
C++Getting Started

Replace one collection element

C++: Update an existing element at a known valid index.

C++✓ Tested
PowerShellText & data

Replace repeated whitespace

Normalize runs of whitespace to one space.

regex✓ Tested
C++Text validation & parsing

Replace text using captured regex groups

C++: Numbered replacement groups can rearrange a known two-part name.

C++✓ Tested
Linux CommandsText processing

Replace text with sed

Replace all occurrences of the substring old on each line and print the transformed text without changing the input file.

sed✓ Tested
GitRemotes & additional checkouts

Replace the URL of a configured remote

Git: set-url changes configuration without fetching or pushing any objects.

Git✓ Tested
GitMerging & replaying changes

Replay an unpublished branch on a newer base

Git: Rebase updates the base of local feature commits when their changes do not conflict.

Git✓ Tested
GoMaps & sets

Represent a set with empty structs

Represent a set with empty structs using a complete Go program with explicit sample inputs.

Go✓ Tested
C++Ownership & optional values

Represent an absent result with optional

C++: value_or supplies a default without requiring a sentinel inside the value domain.

C++✓ Tested