Results for “Strings & literal text”
Small, practical examples. Search by task or narrow things down below.
Search for a literal LIKE wildcard
SQL Server: Declare an escape character so a percent sign in the pattern is literal.
SQL Server✓ Tested
Search for a literal LIKE wildcard
Postgres: Declare an escape character so a percent sign in the pattern is literal.
Postgres✓ Tested
Search for a literal LIKE wildcard
SQLite: Declare an escape character so a percent sign in the pattern is literal.
SQLite✓ Tested
Search for a literal string
Linux Commands: Use grep -F when the pattern contains regex metacharacters that should be literal.
Linux Commands✓ Tested
Split simple delimited text in place
C: strtok inserts terminators into a writable buffer and skips repeated delimiter characters.
C✓ Tested
Trim whitespace around text
Trim whitespace around text in a complete Rust program using the standard library.
Rust✓ Tested
Extract digit sequences
Extract digit sequences using a complete Go program with explicit sample inputs.
Go✓ Tested
Join words with a separator
Join words with a separator using a complete Go program with explicit sample inputs.
Go✓ Tested
Remove an optional prefix
Remove an optional prefix using a complete Go program with explicit sample inputs.
Go✓ Tested
Split a key-value pair once
Split a key-value pair once using a complete Go program with explicit sample inputs.
Go✓ Tested
Split on repeated whitespace
Split on repeated whitespace using a complete Go program with explicit sample inputs.
Go✓ Tested
Trim surrounding whitespace
Trim surrounding whitespace using a complete Go program with explicit sample inputs.
Go✓ Tested