Results for “Text handling & Unicode”
Small, practical examples. Search by task or narrow things down below.
Place missing values after known values portably
Postgres: A CASE sort key controls NULL placement without relying on engine-specific defaults.
Postgres✓ Tested
Place missing values after known values portably
SQLite: A CASE sort key controls NULL placement without relying on engine-specific defaults.
SQLite✓ Tested
Preconfigure some function arguments
Python: Use partial to produce a callable with selected arguments already bound.
Python✓ Tested
Print a selected range of lines
Linux Commands: Use sed -n with a line address to suppress other output.
Linux Commands✓ Tested
Print only the matching portions
Linux Commands: Use extended regex and -o to extract digit sequences.
Linux Commands✓ Tested
Print the final lines of a file
Linux Commands: Use tail -n for a fixed-size suffix of a log.
Linux Commands✓ Tested
Process the lines of an in-memory string
Java: Use String.lines to handle common line terminators without retaining them.
Java✓ Tested
Provide read-only application configuration
Provide read-only application configuration with a small React component and explicit browser behavior.
React✓ Tested
Quote a literal search term for a regex
C#: Regex.Escape prevents metacharacters in a literal term from changing the pattern.
C#✓ Tested
Raise and catch a domain-specific exception
Python: Give a validation failure its own exception type so callers can handle it narrowly.
Python✓ Tested
Read a quoted string containing spaces
C++: The quoted manipulator extracts a quoted field without splitting at internal spaces.
C++✓ Tested
Read fields captured by a Bash regular expression
Bash Scripts: BASH_REMATCH contains the full match followed by capture groups after a successful regex test.
Bash Scripts✓ Tested