FIND YOUR NEXT FEW LINES

Results for “Strings & Unicode”

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

112 snippets foundClear filters
TypeScriptText handling & Unicode

Check whether text ends with a suffix

TypeScript: Use endsWith for a literal case-sensitive ending.

TypeScript✓ Tested
JavaScriptText handling & Unicode

Check whether text starts with a prefix

JavaScript: Use startsWith for a literal case-sensitive prefix comparison.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Check whether text starts with a prefix

TypeScript: Use startsWith for a literal case-sensitive prefix comparison.

TypeScript✓ Tested
CStrings & byte buffers

Compare binary buffers including zero bytes

C: memcmp checks an explicit byte length rather than stopping at a string terminator.

C✓ Tested
GoStrings & text

Compare text ignoring case

Compare text ignoring case using a complete Go program with explicit sample inputs.

Go✓ Tested
CStrings & byte buffers

Count a leading run of allowed characters

C: strspn counts bytes at the start that belong to a specified character set.

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

Extract text by start and end positions

JavaScript: String slice uses an inclusive start and exclusive end measured in UTF-16 code units.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Extract text by start and end positions

TypeScript: String slice uses an inclusive start and exclusive end measured in UTF-16 code units.

TypeScript✓ Tested
JavaScriptText handling & Unicode

Extract the text after the last delimiter

JavaScript: Use lastIndexOf when earlier occurrences should remain part of the prefix.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Extract the text after the last delimiter

TypeScript: Use lastIndexOf when earlier occurrences should remain part of the prefix.

TypeScript✓ Tested