FIND YOUR NEXT FEW LINES

Results for “Text validation & formatting”

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

939 snippets foundClear filters
RustGetting Started

Borrow text without transferring ownership

Borrow text without transferring ownership in a complete Rust program using the standard library.

Rust✓ Tested
GoStrings & text

Build text incrementally

Build text incrementally using a complete Go program with explicit sample inputs.

Go✓ Tested
GoJSON & encoding

Calculate a SHA-256 text digest

Calculate a SHA-256 text digest using a complete Go program with explicit sample inputs.

Go✓ Tested
AngularServices & dependency injection

Centralize a reusable validation rule

Centralize a reusable validation rule with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaStrings

Check whether text contains a phrase

Use a case-sensitive Java substring check.

Java✓ Tested
JavaScriptText handling & Unicode

Check whether text ends with a suffix

JavaScript: Use endsWith for a literal case-sensitive ending.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Check whether text ends with a suffix

TypeScript: Use endsWith for a literal case-sensitive ending.

TypeScript✓ Tested
JavaScriptText handling & Unicode

Check whether text starts with a prefix

JavaScript: Use startsWith for a literal case-sensitive prefix comparison.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Check whether text starts with a prefix

TypeScript: Use startsWith for a literal case-sensitive prefix comparison.

TypeScript✓ Tested
ReactContext & shared state

Choose labels from a language context

Choose labels from a language context with a small React component and explicit browser behavior.

React✓ Tested
GoErrors & validation

Combine independent validation errors

Combine independent validation errors using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonGetting Started

Combine text with a name

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

Python✓ Tested