FIND YOUR NEXT FEW LINES

Results for “tr”

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

1534 snippets foundClear filters
C++Containers & compound values

Remove a map entry and inspect the number removed

C++: erase by key reports whether a unique-key map contained the entry.

C++✓ Tested
Bash ScriptsText parsing & arithmetic

Remove a trailing carriage return from a line

Bash Scripts: Use an ANSI-C quoted carriage return as the suffix pattern.

Bash Scripts✓ Tested
CStrings

Remove a trailing line ending

Use strcspn to terminate a C string at its first newline or carriage return.

C✓ Tested
RustMaps & sets

Remove an entry and inspect its value

Remove an entry and inspect its value in a complete Rust program using the standard library.

Rust✓ Tested
jQueryForm serialization & state

Remove an optional attribute entirely

jQuery: removeAttr removes the attribute instead of setting a string that might still activate it.

jQuery✓ Tested
PowerShellHashtables & object records

Remove an optional hashtable entry

PowerShell: Remove changes the map in place without changing unrelated entries.

PowerShell✓ Tested
PythonMappings & sets

Remove and return a dictionary entry

Python: Use pop with a default when a missing entry is an expected condition.

Python✓ Tested
GitRestoring & revising local work

Remove only a named untracked scratch file

Git: Use a narrow pathspec after reviewing the dry run; clean cannot recover untracked content.

Git✓ Tested
GitRemotes & additional checkouts

Remove stale remote-tracking references

Git: Fetch with prune removes tracking references for branches no longer present on the remote.

Git✓ Tested
AngularGetting Started

Render a list with @for and stable tracking

Render a list with @for and stable tracking with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactAccessibility & events

Render untrusted-looking input as literal text

Render untrusted-looking input as literal text with a small React component and explicit browser behavior.

React✓ Tested
JavaScriptText handling & Unicode

Repeat a string a fixed number of times

JavaScript: String.repeat requires a nonnegative finite repetition count.

JavaScript✓ Tested