FIND YOUR NEXT FEW LINES

Results for “Strings & text”

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

474 snippets foundClear filters
PowerShellStrings & literal text

Check a suffix without case sensitivity

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

PowerShell✓ Tested
PowerShellStrings & literal text

Extract a known substring

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

PowerShell✓ Tested
GoStrings & text

Extract digit sequences

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

Go✓ Tested
PowerShellStrings & literal text

Insert values into a multiline template

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

PowerShell✓ Tested
GoStrings & text

Join words with a separator

Join words with a separator using a complete Go program with explicit sample inputs.

Go✓ Tested
PowerShellStrings & literal text

Pad a label with leading zeroes

PowerShell: Use a numeric format specifier to control the displayed width.

PowerShell✓ Tested
GoStrings & text

Remove an optional prefix

Remove an optional prefix using a complete Go program with explicit sample inputs.

Go✓ Tested
GoStrings & text

Split a key-value pair once

Split a key-value pair once using a complete Go program with explicit sample inputs.

Go✓ Tested
GoStrings & text

Split on repeated whitespace

Split on repeated whitespace using a complete Go program with explicit sample inputs.

Go✓ Tested
GoStrings & text

Trim surrounding whitespace

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

Go✓ 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

Use a literal value in a regular expression

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

PowerShell✓ Tested