FIND YOUR NEXT FEW LINES

Results for “STRING_SPLIT”

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

228 snippets foundClear filters
JavaScriptRegular expressions & URL encoding

Split text on several separator characters

JavaScript: A regex character class can recognize alternative simple delimiters.

JavaScript✓ Tested
TypeScriptRegular expressions & URL encoding

Split text on several separator characters

TypeScript: A regex character class can recognize alternative simple delimiters.

TypeScript✓ Tested
C#LINQ transformations

Split values into fixed-size chunks

C#: Enumerable.Chunk creates arrays and allows a shorter final chunk.

C#✓ Tested
Arduino / CText & bounded buffers

Trim surrounding whitespace from an Arduino String

Arduino / C: String.trim modifies the object in place.

Arduino / C✓ Tested
PowerShellStrings & literal text

Trim whitespace around a string

PowerShell: The Trim method removes surrounding whitespace while preserving the middle of the string.

PowerShell✓ Tested
PowerShellStrings & literal text

Write a multiline string without expanding variables

PowerShell: A single-quoted here-string preserves dollar signs literally.

PowerShell✓ Tested
CStrings & byte buffers

Append text only when the destination has enough capacity

C: Check the combined lengths including the terminator before using strcat.

C✓ Tested
PowerShellFiles & paths

Build a portable file path

Combine directory and filename using the platform separator.

Join-Path✓ Tested
GoStrings & text

Build text incrementally

Build text incrementally using a complete Go program with explicit sample inputs.

Go✓ Tested
CStrings & byte buffers

Check a literal filename suffix

C: Check lengths before subtracting so a short input cannot produce an invalid pointer.

C✓ Tested
PowerShellStrings & literal text

Check a suffix without case sensitivity

PowerShell: Use an ordinal case-insensitive comparison for a known filename extension.

PowerShell✓ Tested
Bash ScriptsArguments & decisions

Compare a value literally inside a conditional

Bash Scripts: Quoting the right side of an equality test makes wildcard characters literal.

Bash Scripts✓ Tested