FIND YOUR NEXT FEW LINES

Results for “Strings & text”

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

474 snippets foundClear filters
JavaScriptGetting Started

Combine text with a name

JavaScript: Construct a greeting from a fixed prefix and a stored name.

JavaScript✓ Tested
TypeScriptGetting Started

Combine text with a name

TypeScript: Construct a greeting from a fixed prefix and a stored name.

TypeScript✓ Tested
C++Getting Started

Combine text with a name

C++: Construct a greeting from a fixed prefix and a stored name.

C++✓ Tested
CGetting Started

Combine text with a name

C: Construct a greeting from a fixed prefix and a stored name.

C✓ Tested
JavaScriptText handling & Unicode

Compare canonically equivalent Unicode text

JavaScript: Normalize to NFC before comparing equivalent composed and decomposed text.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Compare canonically equivalent Unicode text

TypeScript: Normalize to NFC before comparing equivalent composed and decomposed text.

TypeScript✓ Tested
CStrings & byte buffers

Compare two C strings for equality

C: strcmp returns zero only when both null-terminated byte strings are equal.

C✓ Tested
Bash ScriptsGetting Started

Compare two text values

Bash Scripts: Compare two text values with a small standalone Bash program.

Bash Scripts✓ Tested
PythonText validation & encoding

Compare Unicode text without case

Python: Casefold handles more Unicode case mappings than lower for caseless comparison.

Python✓ Tested
ReactForms & validation

Control a multiline text field

Control a multiline text field with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Control a text input

Control a text input with a small React component and explicit browser behavior.

React✓ Tested
C++Text validation & parsing

Convert ASCII text to lowercase safely

C++: Cast each byte to unsigned char before using the cctype function.

C++✓ Tested