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
CStrings

Find a substring

Use strstr to find a literal substring in a C string.

C✓ Tested
GitCommits & history

Find commits by message

Search commit subjects and bodies for a phrase.

log✓ Tested
C#Strings

Find text ignoring case

Use ordinal case-insensitive comparison for a C# substring search.

C#✓ Tested
Arduino / CGetting Started

Give an LED pin a constant name

Arduino / C: Use const to name the built-in LED pin and reuse it in output instructions.

Arduino / C✓ Tested
Arduino / CSerial protocols

Handle incomplete serial input

Arduino / C: The returned byte count distinguishes a complete payload from a timed-out partial one.

Arduino / C✓ Tested
C#File operations & paths

Inspect a file length without reading it

C#: Use FileInfo.Length to retrieve a logical size in bytes.

C#✓ Tested
C#Asynchronous work & URI handling

Inspect a parsed URI

C#: Use Uri properties instead of splitting URL strings manually.

C#✓ Tested
JavaStream transformations

Join transformed stream values

Java: Use Collectors.joining after converting elements to strings.

Java✓ Tested
PythonGetting Started

Measure a short text value

Python: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.

Python✓ Tested
C#Getting Started

Measure a short text value

C#: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.

C#✓ Tested
JavaGetting Started

Measure a short text value

Java: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.

Java✓ Tested
JavaScriptGetting Started

Measure a short text value

JavaScript: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.

JavaScript✓ Tested