FIND YOUR NEXT FEW LINES

Results for “sub”

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

145 snippets foundClear filters
SQLiteText cleanup & matching

Replace a literal substring

SQLite: REPLACE performs a literal replacement rather than a regular-expression substitution.

SQLite✓ Tested
RustStrings & Unicode

Replace a literal substring

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

Rust✓ Tested
ReactCustom hooks

Reuse event subscription cleanup

Reuse event subscription cleanup with a small React component and explicit browser behavior.

React✓ Tested
HTMLForm behavior

Submit a readonly value while preventing edits

HTML: Readonly controls remain in form data, unlike disabled controls.

HTML✓ Tested
ReactPerformance & rendering

Subscribe to a small external store safely

Subscribe to a small external store safely with a small React component and explicit browser behavior.

React✓ Tested
ReactEffects & lifecycle

Subscribe to and clean up a window event

Subscribe to and clean up a window event with a small React component and explicit browser behavior.

React✓ Tested
SQL ServerSelect & page

Substitute a value for NULL

Use SQL Server’s ISNULL expression.

ISNULL✓ Tested
Bash ScriptsInput streams & redirection

Substitute values into a multiline template

Bash Scripts: An unquoted heredoc delimiter enables parameter expansion in the template.

Bash Scripts✓ Tested
RustNumbers & durations

Subtract durations without underflow

Subtract durations without underflow in a complete Rust program using the standard library.

Rust✓ Tested
AngularLifecycle & observable data

Tie a subscription’s lifetime to its component

Tie a subscription’s lifetime to its component with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
HTMLText semantics

Write subscripts and superscripts in ordinary text

HTML: Sub and sup position short annotations such as formula indices and exponents.

HTML✓ Tested
CSSGrid placement

Align a nested grid with its parent’s columns

CSS: Subgrid reuses the parent tracks for the nested grid’s covered span.

CSS✓ Tested