Results for “then”
Small, practical examples. Search by task or narrow things down below.
Count a leading run of allowed characters
C: strspn counts bytes at the start that belong to a specified character set.
C✓ Tested
Count days between UTC-midnight dates
TypeScript: A day is exactly 86400000 milliseconds for these explicitly UTC-midnight inputs.
TypeScript✓ Tested
Count elements satisfying a predicate
C++: count_if counts matches without constructing a filtered collection.
C++✓ Tested
Count matching values
Count even numbers in a fixed C array.
C✓ Tested
Count newline characters
Count newline bytes in a C file while retaining EOF as an int.
C✓ Tested
Count occurrences in a sorted sequence
C++: equal_range finds the half-open interval containing values equal to the key.
C++✓ Tested
Count repeated lines after sorting
Linux Commands: Group identical lines before uniq -c, then normalize its leading padding.
Linux Commands✓ Tested
Count set bits in an unsigned integer
C: Clearing the lowest set bit on each iteration counts only one iteration per set bit.
C✓ Tested
Count the items in a collection
TypeScript: Read the collection’s length instead of hard-coding the loop limit.
TypeScript✓ Tested
Count the items in a collection
C++: Read the collection’s length instead of hard-coding the loop limit.
C++✓ Tested
Count the items in a collection
C: Read the collection’s length instead of hard-coding the loop limit.
C✓ Tested
Count Unicode code points in a string
TypeScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.
TypeScript✓ Tested