Results for “Strings & literal text”
Small, practical examples. Search by task or narrow things down below.
Attach a pronunciation annotation to text
HTML: Ruby and rt represent a base text and its short annotation.
HTML✓ Tested
Bind a text field in both directions
Bind a text field in both directions with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Bind textContent without interpreting markup
Bind textContent without interpreting markup with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Borrow text until a modification is needed
Borrow text until a modification is needed in a complete Rust program using the standard library.
Rust✓ Tested
Borrow text without transferring ownership
Borrow text without transferring ownership in a complete Rust program using the standard library.
Rust✓ Tested
Build text efficiently in a loop
Java: Append to StringBuilder when constructing a string incrementally.
Java✓ Tested
Calculate a SHA-256 text digest
Calculate a SHA-256 text digest using a complete Go program with explicit sample inputs.
Go✓ Tested
Check whether text is valid JSON
Reject malformed input before processing it.
json_valid✓ Tested
Choose labels from a language context
Choose labels from a language context with a small React component and explicit browser behavior.
React✓ Tested
Collect borrowed values into owned strings
Collect borrowed values into owned strings in a complete Rust program using the standard library.
Rust✓ Tested
Combine text values with a separator
SQL: Use the concatenation operator supported by the selected SQL dialect.
SQL✓ Tested
Combine text values with a separator
SQL Server: Use the concatenation operator supported by the selected SQL dialect.
SQL Server✓ Tested