FIND YOUR NEXT FEW LINES

Results for “tr”

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

1534 snippets foundClear filters
SQLiteText cleanup & matching

Remove surrounding spaces from text

SQLite: TRIM removes leading and trailing space characters by default.

SQLite✓ Tested
GitBranches & ancestry

Rename the current branch

Git: branch -m changes the local branch name without creating a new commit.

Git✓ Tested
AngularLists & control flow

Render groups with nested loops

Render groups with nested loops with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Linux CommandsTransforming text

Reorder fields with a capture group

Linux Commands: Use extended regular expressions and backreferences to rearrange a known format.

Linux Commands✓ Tested
JavaScriptArray restructuring

Replace an array segment in place

JavaScript: splice returns removed items and inserts replacements at the chosen position.

JavaScript✓ Tested
TypeScriptArray restructuring

Replace an array segment in place

TypeScript: splice returns removed items and inserts replacements at the chosen position.

TypeScript✓ Tested
GoStrings & text

Replace literal text

Replace literal text using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaRecords & reliable control flow

Represent a finite set of states

Java: Use an enum to prevent arbitrary strings from representing application states.

Java✓ Tested
PythonStructured data & serialization

Represent a record with a dataclass

Python: Generate initialization and convert a typed record to a dictionary.

Python✓ Tested
CStructures & function interfaces

Represent a small set of named states

C: An enum gives symbolic names to integer state values.

C✓ Tested
HTMLInput constraints

Require a checkbox to be selected

HTML: A required checkbox is invalid until that individual control is checked.

HTML✓ Tested
HTMLInput constraints

Require a nonempty text value

HTML: The required attribute makes an empty text control fail native constraint validation.

HTML✓ Tested