Results for “string”
Small, practical examples. Search by task or narrow things down below.
Inspect a parsed URI
C#: Use Uri properties instead of splitting URL strings manually.
C#✓ Tested
Inspect a URI through typed properties
PowerShell: The Uri class separates URL components without manual string splitting.
PowerShell✓ Tested
Join transformed stream values
Java: Use Collectors.joining after converting elements to strings.
Java✓ Tested
Match a whole word
Linux Commands: Use grep -w to exclude a matching substring inside a longer word.
Linux Commands✓ Tested
Measure a short text value
Python: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
Python✓ Tested
Measure a short text value
C#: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
C#✓ Tested
Measure a short text value
Java: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
Java✓ Tested
Measure a short text value
JavaScript: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
JavaScript✓ Tested
Measure a short text value
TypeScript: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
TypeScript✓ Tested
Measure a short text value
C++: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
C++✓ Tested
Measure a short text value
C: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
C✓ Tested
Measure UTF-8 bytes separately from characters
Java: Encode a Java string before measuring its serialized byte length.
Java✓ Tested