FIND YOUR NEXT FEW LINES

Results for “Text handling & Unicode”

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

470 snippets foundClear filters
JavaScriptText handling & Unicode

Normalize identifier case consistently

JavaScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Normalize identifier case consistently

TypeScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.

TypeScript✓ Tested
JavaScriptText handling & Unicode

Repeat a string a fixed number of times

JavaScript: String.repeat requires a nonnegative finite repetition count.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Repeat a string a fixed number of times

TypeScript: String.repeat requires a nonnegative finite repetition count.

TypeScript✓ Tested
JavaScriptText handling & Unicode

Transform each regex match with a callback

JavaScript: A replacement callback computes the replacement separately for each match.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Transform each regex match with a callback

TypeScript: A replacement callback computes the replacement separately for each match.

TypeScript✓ Tested
JavaScriptText handling & Unicode

Trim and discard blank lines

JavaScript: Split a text block, trim each line, and keep nonempty values.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Trim and discard blank lines

TypeScript: Split a text block, trim each line, and keep nonempty values.

TypeScript✓ Tested
PythonText validation & encoding

Compare Unicode text without case

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

Python✓ Tested
RustStrings & Unicode

Compare ASCII text ignoring case

Compare ASCII text ignoring case in a complete Rust program using the standard library.

Rust✓ Tested
JavaText validation & formatting

Count Unicode code points

Java: Use codePointCount when supplementary characters should count as one rather than two UTF-16 units.

Java✓ Tested
C#Text validation & encoding

Enumerate Unicode code points

C#: EnumerateRunes combines surrogate pairs into Unicode scalar values.

C#✓ Tested