FIND YOUR NEXT FEW LINES

Results for “Strings & byte buffers”

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

195 snippets foundClear filters
RustStrings & Unicode

Take Unicode characters without byte slicing

Take Unicode characters without byte slicing in a complete Rust program using the standard library.

Rust✓ Tested
Arduino / CBinary values & packets

Calculate a CRC-8 over a byte sequence

Arduino / C: This implementation uses polynomial 0x07, initial zero, and no reflection.

Arduino / C✓ Tested
GoTesting & reusable helpers

Check whether bytes contain valid JSON

Check whether bytes contain valid JSON using a complete Go program with explicit sample inputs.

Go✓ Tested
RustTesting & reusable patterns

Collect borrowed values into owned strings

Collect borrowed values into owned strings in a complete Rust program using the standard library.

Rust✓ Tested
PowerShellStructured formats & encodings

Convert between hexadecimal text and bytes

PowerShell: Use the .NET hexadecimal helpers instead of parsing byte pairs manually.

PowerShell✓ Tested
C#JSON & binary formats

Convert bytes to Base64 and back

C#: Encode text to UTF-8 before converting it to a Base64 representation.

C#✓ Tested
JavaEncoding & structured values

Convert bytes to hexadecimal and back

Java: Use HexFormat for a standard-library representation of raw bytes.

Java✓ Tested
PythonText validation & encoding

Convert hexadecimal text to bytes

Python: Use bytes.fromhex for a readable byte representation and hex for the reverse conversion.

Python✓ Tested
RustFiles & paths

Copy a file and inspect the copied byte count

Copy a file and inspect the copied byte count in a complete Rust program using the standard library.

Rust✓ Tested
Arduino / CDigital signals & interrupts

Copy a multibyte interrupt-owned counter atomically

Arduino / C: ATOMIC_RESTORESTATE restores the interrupt state after reading a shared value.

Arduino / C✓ Tested
GoFiles & paths

Copy a stream and count its bytes

Copy a stream and count its bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsStreams & byte tools

Count bytes in a file

Linux Commands: Use wc -c for byte length rather than Unicode character count.

Linux Commands✓ Tested