Results for “unicode”
Small, practical examples. Search by task or narrow things down below.
Normalize identifier case consistently
TypeScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.
TypeScript✓ Tested
Remove a prefix only when it matches
Remove a prefix only when it matches in a complete Rust program using the standard library.
Rust✓ Tested
Repeat a string a fixed number of times
JavaScript: String.repeat requires a nonnegative finite repetition count.
JavaScript✓ Tested
Repeat a string a fixed number of times
TypeScript: String.repeat requires a nonnegative finite repetition count.
TypeScript✓ Tested
Replace a literal substring
Replace a literal substring in a complete Rust program using the standard library.
Rust✓ Tested
Split a key-value pair once
Split a key-value pair once in a complete Rust program using the standard library.
Rust✓ Tested
Transform each regex match with a callback
JavaScript: A replacement callback computes the replacement separately for each match.
JavaScript✓ Tested
Transform each regex match with a callback
TypeScript: A replacement callback computes the replacement separately for each match.
TypeScript✓ Tested
Trim and discard blank lines
JavaScript: Split a text block, trim each line, and keep nonempty values.
JavaScript✓ Tested
Trim and discard blank lines
TypeScript: Split a text block, trim each line, and keep nonempty values.
TypeScript✓ Tested
Trim whitespace around text
Trim whitespace around text in a complete Rust program using the standard library.
Rust✓ Tested
Count bytes in a file
Linux Commands: Use wc -c for byte length rather than Unicode character count.
Linux Commands✓ Tested