Results for “Text validation & parsing”
Small, practical examples. Search by task or narrow things down below.
Convert known numeric text to an integer
TypeScript: Convert a trusted literal to an integer before adding. Validate external input before converting it.
TypeScript✓ Tested
Convert known numeric text to an integer
C++: Convert a trusted literal to an integer before adding. Validate external input before converting it.
C++✓ Tested
Convert known numeric text to an integer
C: Convert a trusted literal to an integer before adding. Validate external input before converting it.
C✓ Tested
Copy text into a fixed buffer
Use snprintf and check for truncation when copying a C string.
C✓ Tested
Create an array of text values
PowerShell: Create an array of text values using PowerShell 7.
PowerShell✓ Tested
Display a label in uppercase without changing its text
CSS: Text-transform changes visual casing while preserving the DOM’s source text.
CSS✓ Tested
Display a specific reactive validation error
Display a specific reactive validation error with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Display code as text
Escape angle brackets in preformatted HTML code samples.
HTML✓ Tested
Display reserved characters as text
HTML: Learn how to display reserved characters as text in a complete browser example.
HTML✓ Tested
Display untrusted-looking text without HTML execution
Display untrusted-looking text without HTML execution with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Encode and decode Base64 text
Encode and decode Base64 text using a complete Go program with explicit sample inputs.
Go✓ Tested
Encode and decode UTF-8 text with Base64
PowerShell: Convert the string to bytes explicitly before Base64 encoding.
PowerShell✓ Tested