FIND YOUR NEXT FEW LINES

Results for “save file”

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

1970 snippets foundClear filters
C++Text validation & parsing

Trim surrounding ASCII whitespace

C++: Find the first and last non-whitespace bytes before taking a substring.

C++✓ Tested
JavaStrings

Trim surrounding whitespace

Remove leading and trailing whitespace from a Java string.

Java✓ Tested
JavaScriptStrings

Trim surrounding whitespace

Remove leading and trailing JavaScript string whitespace.

JavaScript✓ Tested
CSSTypography

Truncate a single line

Combine CSS overflow and ellipsis for a constrained single line.

CSS✓ Tested
TypeScriptCollections & records

Type a dictionary with Record

Limit a lookup table to a known set of keys.

Record✓ Tested
TypeScriptTypes & functions

Type a function’s inputs and output

Catch mismatched arguments during compilation.

function✓ Tested
TypeScriptUtilities & async

Type an object update with Partial

Allow a caller to provide just the fields to change.

Partial✓ Tested
GitRestoring & revising local work

Uncommit a local change and leave its edits unstaged

Git: A mixed reset resets the index while retaining working-file contents.

Git✓ Tested
GitRestoring & revising local work

Uncommit the latest local change while keeping it staged

Git: A soft reset moves the branch tip but preserves both index and working files.

Git✓ Tested
CSSGetting Started

Underline meaningful text

CSS: Learn how to underline meaningful text in a complete browser example.

CSS✓ Tested
CSSGetting Started

Understand later rules in the cascade

CSS: Learn how to understand later rules in the cascade in a complete browser example.

CSS✓ Tested
GitBranches & recovery

Undo a commit with a new commit

Reverse a change while preserving shared history.

revert✓ Tested