FIND YOUR NEXT FEW LINES

Results for “none”

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

33 snippets foundClear filters
C++Sequence algorithms

Find both extremes in one algorithm call

C++: Check for a nonempty input before dereferencing the returned iterators.

C++✓ Tested
CArrays

Find the largest array value

Track the maximum in a nonempty C integer array.

C✓ 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
PythonStructured data & serialization

Read one JSON document per line

Python: Parse nonempty JSON Lines records independently instead of loading a JSON array.

Python✓ Tested
PythonGetting Started

Read the beginning of a text value

Python: Extract or display the first three ASCII characters from a known nonempty string.

Python✓ Tested
C#Getting Started

Read the beginning of a text value

C#: Extract or display the first three ASCII characters from a known nonempty string.

C#✓ Tested
JavaGetting Started

Read the beginning of a text value

Java: Extract or display the first three ASCII characters from a known nonempty string.

Java✓ Tested
JavaScriptGetting Started

Read the beginning of a text value

JavaScript: Extract or display the first three ASCII characters from a known nonempty string.

JavaScript✓ Tested
TypeScriptGetting Started

Read the beginning of a text value

TypeScript: Extract or display the first three ASCII characters from a known nonempty string.

TypeScript✓ Tested
C++Getting Started

Read the beginning of a text value

C++: Extract or display the first three ASCII characters from a known nonempty string.

C++✓ Tested
CGetting Started

Read the beginning of a text value

C: Extract or display the first three ASCII characters from a known nonempty string.

C✓ Tested
PythonGetting Started

Read the first collection element

Python: Access index zero only after establishing that the collection is nonempty.

Python✓ Tested