FIND YOUR NEXT FEW LINES

Results for “Strings & Unicode”

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

112 snippets foundClear filters
CStrings & byte buffers

Find the final path separator

C: strrchr locates the last matching character without modifying the input.

C✓ Tested
CStrings & byte buffers

Find the first occurrence of a character

C: strchr returns a pointer into the input or NULL if the character is absent.

C✓ 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
CStrings & byte buffers

Move overlapping bytes safely

C: memmove supports overlapping ranges, unlike memcpy.

C✓ Tested
JavaScriptText handling & Unicode

Normalize identifier case consistently

JavaScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Normalize identifier case consistently

TypeScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.

TypeScript✓ 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
JavaScriptText handling & Unicode

Repeat a string a fixed number of times

JavaScript: String.repeat requires a nonnegative finite repetition count.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Repeat a string a fixed number of times

TypeScript: String.repeat requires a nonnegative finite repetition count.

TypeScript✓ Tested
GoStrings & text

Replace literal text

Replace literal text using a complete Go program with explicit sample inputs.

Go✓ Tested