FIND YOUR NEXT FEW LINES

Results for “STRING_SPLIT”

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

228 snippets foundClear filters
Arduino / CEEPROM & program memory

Store a bounded null-terminated text setting

Arduino / C: Write a fixed buffer and explicitly terminate the retrieved copy.

Arduino / C✓ Tested
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
GoStrings & text

Trim surrounding whitespace

Trim surrounding whitespace using a complete Go program with explicit sample inputs.

Go✓ Tested
RustStrings & Unicode

Trim whitespace around text

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

Rust✓ Tested
PowerShellStrings & literal text

Use a literal value in a regular expression

PowerShell: Regex.Escape prevents a literal dot or other metacharacter from changing the match.

PowerShell✓ Tested
JavaText validation & formatting

Build text efficiently in a loop

Java: Append to StringBuilder when constructing a string incrementally.

Java✓ Tested
C++Text validation & parsing

Check a literal prefix in C++17

C++: Use string compare because starts_with was introduced after C++17.

C++✓ Tested
C#Text validation & encoding

Check a literal prefix with ordinal comparison

C#: Choose StringComparison.Ordinal when a prefix is a protocol token rather than culture-dependent text.

C#✓ Tested
Bash ScriptsArray operations

Check exact array membership

Bash Scripts: Compare each element literally instead of searching a concatenated string.

Bash Scripts✓ Tested
JavaStrings

Check whether text contains a phrase

Use a case-sensitive Java substring check.

Java✓ Tested
PowerShellFunctions & control

Choose an action with switch

Map a small command value to a result.

switch✓ Tested
Arduino / CSerial communication

Collect a serial line in a fixed buffer

Read a short command without dynamic String allocation.

serial line✓ Tested