Results for “Text handling & Unicode”
Small, practical examples. Search by task or narrow things down below.
Write formatted text into a byte buffer
Write formatted text into a byte buffer in a complete Rust program using the standard library.
Rust✓ Tested
Write subscripts and superscripts in ordinary text
HTML: Sub and sup position short annotations such as formula indices and exponents.
HTML✓ Tested
Write text to a new practice file
Linux Commands: Write text to a new practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Write UTF-8 text to a file
Save a string without adding an extra newline.
Set-Content✓ Tested
Avoid a shared mutable default argument
Python: Create a fresh list inside the function when the optional argument is omitted.
Python✓ Tested
Await an asynchronous method result
C#: Use Task<T> for an async operation with a typed result.
C#✓ Tested
Await multiple tasks while preserving result order
C#: Task.WhenAll returns results in the same order as the supplied tasks.
C#✓ Tested
Bind a multiline notes field
Bind a multiline notes field with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Branch on whether a pattern exists
Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.
Linux Commands✓ Tested
Build a URL query string
Python: Use urlencode to percent-encode query parameter values correctly.
Python✓ Tested
Cache repeated pure function calls
Python: Use lru_cache to avoid recomputing results for identical hashable arguments.
Python✓ Tested
Capture a command’s success-stream output
PowerShell: Assignment collects output values without requiring text redirection to a file.
PowerShell✓ Tested