Results for “Text cleanup & matching”
Small, practical examples. Search by task or narrow things down below.
Compare canonically equivalent Unicode text
TypeScript: Normalize to NFC before comparing equivalent composed and decomposed text.
TypeScript✓ Tested
Compare text ignoring case
Compare text ignoring case using a complete Go program with explicit sample inputs.
Go✓ Tested
Compare two text values
Bash Scripts: Compare two text values with a small standalone Bash program.
Bash Scripts✓ Tested
Compare Unicode text without case
Python: Casefold handles more Unicode case mappings than lower for caseless comparison.
Python✓ Tested
Control a multiline text field
Control a multiline text field with a small React component and explicit browser behavior.
React✓ Tested
Control a text input
Control a text input with a small React component and explicit browser behavior.
React✓ Tested
Convert ASCII text to lowercase safely
C++: Cast each byte to unsigned char before using the cctype function.
C++✓ Tested
Convert ASCII text to lowercase safely
C: Cast to unsigned char before calling ctype functions on a possibly signed char.
C✓ Tested
Convert ASCII text to uppercase
Convert characters with toupper while avoiding signed-char undefined behavior.
C✓ Tested
Convert between hexadecimal text and bytes
PowerShell: Use the .NET hexadecimal helpers instead of parsing byte pairs manually.
PowerShell✓ Tested
Convert hexadecimal text to bytes
Python: Use bytes.fromhex for a readable byte representation and hex for the reverse conversion.
Python✓ Tested
Convert known numeric text to an integer
Python: Convert a trusted literal to an integer before adding. Validate external input before converting it.
Python✓ Tested