FIND YOUR NEXT FEW LINES

Results for “empty”

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

487 snippets foundClear filters
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
Linux CommandsGetting Started

Read the beginning of piped text

Linux Commands: Read the beginning of piped text using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
GitBranches & ancestry

Read the current branch name

Git: show-current returns an empty string when HEAD is detached.

Git✓ Tested
Linux CommandsGetting Started

Read the directory portion of a path

Linux Commands: Read the directory portion of a path using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Linux CommandsGetting Started

Read the end of piped text

Linux Commands: Read the end of piped text using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Linux CommandsGetting Started

Read the filename portion of a path

Linux Commands: Read the filename portion of a path using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Bash ScriptsGetting Started

Read the first array element

Bash Scripts: Read the first array element with a small standalone Bash program.

Bash Scripts✓ Tested
PythonGetting Started

Read the first collection element

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

Python✓ Tested
C#Getting Started

Read the first collection element

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

C#✓ Tested
JavaGetting Started

Read the first collection element

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

Java✓ Tested