FIND YOUR NEXT FEW LINES

Results for “Encoding & structured values”

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

391 snippets foundClear filters
CBinary formats & structured parsing

Decode a validated pair of hexadecimal digits

C: Convert each nibble and reject a nonhexadecimal character before combining them.

C✓ Tested
GoJSON & encoding

Decode JSON into a typed struct

Decode JSON into a typed struct using a complete Go program with explicit sample inputs.

Go✓ Tested
CBinary formats & structured parsing

Encode a byte buffer as hexadecimal

C: Format each byte as an unsigned two-digit hexadecimal value.

C✓ Tested
GoJSON & encoding

Encode a struct with JSON field names

Encode a struct with JSON field names using a complete Go program with explicit sample inputs.

Go✓ Tested
Arduino / CBinary values & packets

Encode a value as little-endian bytes

Arduino / C: Store the least significant byte first when the protocol requires it.

Arduino / C✓ Tested
GoJSON & encoding

Encode and decode Base64 text

Encode and decode Base64 text using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonText validation & encoding

Encode and decode binary data as Base64

Python: Use Base64 when a text format must carry bytes; it is encoding, not encryption.

Python✓ Tested
GoJSON & encoding

Encode bytes as hexadecimal

Encode bytes as hexadecimal using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonText validation & encoding

Escape text for HTML content

Python: Use html.escape before placing plain text in an HTML text or quoted attribute context.

Python✓ Tested
C#Text validation & encoding

Extract a substring with range syntax

C#: C# range ends are exclusive; indices operate on UTF-16 code units.

C#✓ Tested
C#Text validation & encoding

Extract all integer tokens from text

C#: Enumerate Match objects returned by Regex.Matches with an explicit timeout.

C#✓ Tested
JavaScriptRegular expressions & URL encoding

Extract all regex matches with their groups

JavaScript: matchAll requires a global regular expression and returns an iterator of matches.

JavaScript✓ Tested