FIND YOUR NEXT FEW LINES

Results for “C++”

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

3000 snippets foundClear filters
HTMLText semantics

Isolate a value with a different writing direction

HTML: Bdi isolates embedded user text so its direction does not reorder surrounding punctuation.

HTML✓ Tested
Bash ScriptsFunction scope & composition

Isolate variable changes in a subshell

Bash Scripts: Parentheses create a subshell whose variable assignments do not change the parent.

Bash Scripts✓ Tested
CStructures & function interfaces

Iterate over a fixed array of records

C: Compute the array element count with sizeof at the point where it is still an array.

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
GoSlices & collections

Iterate over bounded chunks

Iterate over bounded chunks using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaScriptObjects & JSON

Iterate over object entries

Read JavaScript property names and values using Object.entries.

JavaScript✓ Tested
JavaScriptArray traversal & selection

Iterate with array indices and values

JavaScript: entries provides each position and value without a separate counter.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Iterate with array indices and values

TypeScript: entries provides each position and value without a separate counter.

TypeScript✓ Tested
Bash ScriptsArray operations

Join array items with a one-character separator

Bash Scripts: A local IFS controls the separator used by the quoted star expansion.

Bash Scripts✓ Tested
GoFiles & paths

Join portable path components

Join portable path components using a complete Go program with explicit sample inputs.

Go✓ Tested
SQL ServerDates & text

Join rows in a chosen order

Aggregate text with STRING_AGG and WITHIN GROUP.

STRING_AGG✓ Tested
RustStrings & Unicode

Join string slices

Join string slices in a complete Rust program using the standard library.

Rust✓ Tested