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
GoStrings & text

Compare text ignoring case

Compare text ignoring case using a complete Go program with explicit sample inputs.

Go✓ Tested
Arduino / CText & bounded buffers

Copy a string with a guaranteed terminator

Arduino / C: Reserve one character for the terminator when copying a bounded string.

Arduino / C✓ Tested
Linux CommandsStreams & byte tools

Count whitespace-separated words

Linux Commands: Use wc -w with standard input to omit the filename column.

Linux Commands✓ Tested
RustParsing & byte data

Detect invalid UTF-8 data

Detect invalid UTF-8 data in a complete Rust program using the standard library.

Rust✓ Tested
Arduino / CText & bounded buffers

Detect truncated formatted output

Arduino / C: snprintf returns the length it would have written, excluding the null terminator.

Arduino / C✓ Tested
Linux CommandsStreams & byte tools

Encode and decode a file with Base64

Linux Commands: Use GNU base64 for text transport of bytes and --decode for the reverse operation.

Linux Commands✓ Tested
PowerShellStrings & literal text

Extract a known substring

PowerShell: Substring uses a zero-based starting index and a character count.

PowerShell✓ Tested
Arduino / CText & bounded buffers

Extract a section of an Arduino String

Arduino / C: substring includes the start index and excludes the end index.

Arduino / C✓ Tested
GoStrings & text

Extract digit sequences

Extract digit sequences using a complete Go program with explicit sample inputs.

Go✓ Tested
RustParsing & byte data

Format an integer as padded hexadecimal

Format an integer as padded hexadecimal in a complete Rust program using the standard library.

Rust✓ Tested
PowerShellStrings & literal text

Insert values into a multiline template

PowerShell: A double-quoted here-string expands variable references.

PowerShell✓ Tested
RustStrings & Unicode

Join string slices

Join string slices in a complete Rust program using the standard library.

Rust✓ Tested