FIND YOUR NEXT FEW LINES

Results for “end”

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

533 snippets foundClear filters
JavaText validation & formatting

Build text efficiently in a loop

Java: Append to StringBuilder when constructing a string incrementally.

Java✓ Tested
C#Text validation & encoding

Build text incrementally with StringBuilder

C#: Append fragments instead of repeatedly concatenating intermediate strings in a loop.

C#✓ Tested
AngularGetting Started

Calculate a value in a template

Calculate a value in a template with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactGetting Started

Calculate a value inside JSX

Calculate a value inside JSX with a small React component and explicit browser behavior.

React✓ Tested
AngularGetting Started

Call a component method from an event

Call a component method from an event with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactEffects & lifecycle

Cancel an asynchronous operation on unmount

Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.

React✓ Tested
AngularPipes & formatting

Capitalize words with TitleCasePipe

Capitalize words with TitleCasePipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactState & reducers

Centralize state changes in a reducer

Centralize state changes in a reducer with a small React component and explicit browser behavior.

React✓ Tested
JavaText validation & formatting

Check a filename suffix

Java: Use endsWith for a case-sensitive literal suffix test.

Java✓ Tested
C#Text validation & encoding

Check a literal prefix with ordinal comparison

C#: Choose StringComparison.Ordinal when a prefix is a protocol token rather than culture-dependent text.

C#✓ Tested
PowerShellCommands & execution context

Check an external process exit status explicitly

PowerShell: LASTEXITCODE reports a native child exit code independently of ordinary PowerShell cmdlet errors.

PowerShell✓ Tested
C++Numeric parsing & calculations

Check an upper integer bound before adding

C++: For these nonnegative values, compare against the maximum minus the addend first.

C++✓ Tested