Results for “first lines”
Small, practical examples. Search by task or narrow things down below.
Read recent commit messages
View a compact history in newest-first order.
log✓ Tested
Read the beginning of a text value
Python: Extract or display the first three ASCII characters from a known nonempty string.
Python✓ Tested
Read the beginning of a text value
C#: Extract or display the first three ASCII characters from a known nonempty string.
C#✓ Tested
Read the beginning of a text value
Java: Extract or display the first three ASCII characters from a known nonempty string.
Java✓ Tested
Read the beginning of a text value
JavaScript: Extract or display the first three ASCII characters from a known nonempty string.
JavaScript✓ Tested
Read the beginning of a text value
TypeScript: Extract or display the first three ASCII characters from a known nonempty string.
TypeScript✓ Tested
Read the beginning of a text value
C++: Extract or display the first three ASCII characters from a known nonempty string.
C++✓ Tested
Read the beginning of a text value
C: Extract or display the first three ASCII characters from a known nonempty string.
C✓ Tested
Refresh a cached data attribute deliberately
jQuery: After the first read, data caches a parsed value; removeData forces a new attribute read.
jQuery✓ Tested
Remove a trailing line ending
Use strcspn to terminate a C string at its first newline or carriage return.
C✓ Tested
Remove duplicate records by a selected key
C#: DistinctBy keeps the first record for each key in encounter order.
C#✓ Tested
Remove duplicate values
Use a JavaScript Set to preserve the first occurrence of each primitive value.
JavaScript✓ Tested