FIND YOUR NEXT FEW LINES

Results for “Strings & text”

Small, practical examples. Search by task or narrow things down below.

474 snippets foundClear filters
HTMLInput constraints

Limit a numeric input to an inclusive range

HTML: Number inputs expose range validation separately from the entered text.

HTML✓ Tested
C#Files & paths

List matching files

Enumerate immediate text files and sort their names in C#.

C#✓ Tested
CStrings

Measure a string length

Count bytes before the null terminator with C strlen.

C✓ Tested
TypeScriptTypes & functions

Narrow a union using typeof

Handle text and numeric values with separate branches.

union✓ Tested
SQLiteQueries & text

Number a sorted result

Assign a row number without changing stored data.

row_number✓ Tested
PostgresWindows & text

Number rows within each group

Assign ordered row numbers with a window function.

row_number✓ Tested
HTMLLinks & accessibility

Open a link in a separate tab

Declare a separate browsing context with an explicit noopener relationship.

HTML✓ Tested
PythonStrings & dates

Parse and format a date

Convert a date string into a datetime object, then format it in a different, human-readable order.

date✓ Tested
PowerShellText & data

Parse JSON into an object

Access a named field in a JSON document.

JSON✓ Tested
CSSTypography

Preserve whitespace while wrapping

Use CSS pre-wrap for multiline text that retains spaces.

CSS✓ Tested
Arduino / CGetting Started

Print a label beside a number

Arduino / C: Combine Serial.print and Serial.println to put text and a value on one line.

Arduino / C✓ Tested
jQueryText & attributes

Read a data attribute

Read an element data attribute with jQuery data.

jQuery✓ Tested