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
C#Asynchronous work & URI handling

Escape text for an HTML context

C#: HtmlEncode converts markup delimiters in plain text before rendering it as HTML content.

C#✓ Tested
C#Text validation & encoding

Normalize canonically equivalent Unicode strings

C#: Normalize to NFC before an ordinal comparison of equivalent character sequences.

C#✓ Tested
PythonText validation & encoding

Normalize equivalent Unicode strings

Python: Normalize to NFC before comparing canonically equivalent text.

Python✓ Tested
PythonFunctions & error handling

Run cleanup around a custom context

Python: Use try/finally inside a contextmanager so cleanup runs even on failure.

Python✓ Tested
RustStrings & Unicode

Trim whitespace around text

Trim whitespace around text in a complete Rust program using the standard library.

Rust✓ Tested
HTMLGetting Started

Accept several lines of text

HTML: Learn how to accept several lines of text in a complete browser example.

HTML✓ Tested
HTMLForms

Add a multiline text field

Set a maximum length and visible rows on a labeled HTML textarea.

HTML✓ Tested
RustErrors & optional values

Add context to a parsing failure

Add context to a parsing failure in a complete Rust program using the standard library.

Rust✓ Tested
CSSGetting Started

Align inline text in its container

CSS: Learn how to align inline text in its container in a complete browser example.

CSS✓ Tested
CSSType & reading flow

Align inline text to the container’s end edge

CSS: Text-align end follows the writing direction rather than always choosing the right edge.

CSS✓ Tested
CStrings & byte buffers

Append text only when the destination has enough capacity

C: Check the combined lengths including the terminator before using strcat.

C✓ Tested
C++Files & paths

Append text to a file

Open a C++ stream in append mode and verify the write.

C++✓ Tested