Results for “Text validation & encoding”
Small, practical examples. Search by task or narrow things down below.
Set an element attribute
Update an HTML link using jQuery attr.
jQuery✓ Tested
Show the first lines of a file
Read only the first three lines of a text file, useful for checking a header or previewing a large log.
head✓ Tested
Sort and deduplicate lines
Sort lines alphabetically and remove duplicate lines in a predictable C locale.
sort✓ Tested
Split a file into fixed line-count pieces
Linux Commands: Use numeric suffixes for predictable filenames when splitting a large text file.
Linux Commands✓ Tested
Split a line into named fields
Read a simple delimiter-separated line into variables.
read✓ Tested
Split a string into words
Split text on whitespace, automatically treating repeated spaces, tabs, and line breaks as a single separator.
string✓ Tested
Split and trim values
Split simple comma-separated C# text and trim each value.
C#✓ Tested
Style content associated with a checked option
CSS: The adjacent-sibling selector connects a checked control with its following label text.
CSS✓ Tested
Style list markers
Set marker color separately from list text using CSS ::marker.
CSS✓ Tested
Sum the decimal digits of an unsigned integer
C: Repeated division and remainder extract digits without converting to text.
C✓ Tested
Type a function’s inputs and output
Catch mismatched arguments during compilation.
function✓ Tested
Update a JSON property
Create updated JSON text with JSON_MODIFY.
JSON_MODIFY✓ Tested