FIND YOUR NEXT FEW LINES

The snippet library.

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

3000 snippets foundClear filters
AngularComponents & communication

Normalize an input with a transform

Normalize an input with a transform with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
SQLText cleanup & matching

Normalize ASCII text to lowercase

SQL: LOWER is useful for display normalization; indexed case-insensitive search depends on the database collation and schema.

SQL✓ Tested
SQL ServerText cleanup & matching

Normalize ASCII text to lowercase

SQL Server: LOWER is useful for display normalization; indexed case-insensitive search depends on the database collation and schema.

SQL Server✓ Tested
PostgresText cleanup & matching

Normalize ASCII text to lowercase

Postgres: LOWER is useful for display normalization; indexed case-insensitive search depends on the database collation and schema.

Postgres✓ Tested
SQLiteText cleanup & matching

Normalize ASCII text to lowercase

SQLite: LOWER is useful for display normalization; indexed case-insensitive search depends on the database collation and schema.

SQLite✓ Tested
SQLText cleanup & matching

Normalize ASCII text to uppercase

SQL: UPPER changes character case under the database’s text rules.

SQL✓ Tested
SQL ServerText cleanup & matching

Normalize ASCII text to uppercase

SQL Server: UPPER changes character case under the database’s text rules.

SQL Server✓ Tested
PostgresText cleanup & matching

Normalize ASCII text to uppercase

Postgres: UPPER changes character case under the database’s text rules.

Postgres✓ Tested
SQLiteText cleanup & matching

Normalize ASCII text to uppercase

SQLite: UPPER changes character case under the database’s text rules.

SQLite✓ Tested
C#Text validation & encoding

Normalize canonically equivalent Unicode strings

C#: Normalize to NFC before an ordinal comparison of equivalent character sequences.

C#✓ Tested
PythonText validation & encoding

Normalize equivalent Unicode strings

Python: Normalize to NFC before comparing canonically equivalent text.

Python✓ Tested
JavaScriptText handling & Unicode

Normalize identifier case consistently

JavaScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.

JavaScript✓ Tested