Results for “then”
Small, practical examples. Search by task or narrow things down below.
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
Extract the text after the last delimiter
TypeScript: Use lastIndexOf when earlier occurrences should remain part of the prefix.
TypeScript✓ Tested
Filter a signal-backed list
Filter a signal-backed list with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Filter an array in place with a write index
C: Only retained values advance the write position.
C✓ Tested
Filter and transform an array
Keep active objects and extract their names.
filter✓ Tested
Filter even numbers
Use LINQ Where to keep even C# values.
C#✓ Tested
Filter even numbers
Use a Java stream to collect only even values.
Java✓ Tested
Filter observable emissions
Filter observable emissions with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Find a median element without fully sorting
C++: nth_element partitions around the element that would occupy the chosen sorted position.
C++✓ Tested
Find a substring
Check the result of std::string::find against npos.
C++✓ Tested
Find a substring
Use strstr to find a literal substring in a C string.
C✓ Tested
Find an array element
Use a bounded linear search over a C array.
C✓ Tested