FIND YOUR NEXT FEW LINES

Results for “then”

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

703 snippets foundClear filters
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
TypeScriptUTC date operations

Count days between UTC-midnight dates

TypeScript: A day is exactly 86400000 milliseconds for these explicitly UTC-midnight inputs.

TypeScript✓ Tested
C++Sequence algorithms

Count elements satisfying a predicate

C++: count_if counts matches without constructing a filtered collection.

C++✓ Tested
CArrays

Count matching values

Count even numbers in a fixed C array.

C✓ Tested
CFiles

Count newline characters

Count newline bytes in a C file while retaining EOF as an int.

C✓ Tested
C++Ordering & set operations

Count occurrences in a sorted sequence

C++: equal_range finds the half-open interval containing values equal to the key.

C++✓ Tested
Linux CommandsSorting & joining records

Count repeated lines after sorting

Linux Commands: Group identical lines before uniq -c, then normalize its leading padding.

Linux Commands✓ Tested
CSmall algorithms & bit operations

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
TypeScriptGetting Started

Count the items in a collection

TypeScript: Read the collection’s length instead of hard-coding the loop limit.

TypeScript✓ Tested
C++Getting Started

Count the items in a collection

C++: Read the collection’s length instead of hard-coding the loop limit.

C++✓ Tested
CGetting Started

Count the items in a collection

C: Read the collection’s length instead of hard-coding the loop limit.

C✓ Tested
TypeScriptText handling & Unicode

Count Unicode code points in a string

TypeScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.

TypeScript✓ Tested