Results for “save”
Small, practical examples. Search by task or narrow things down below.
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
Java: Use codePointCount when supplementary characters should count as one rather than two UTF-16 units.
Java✓ Tested
Count Unicode code points
Count Unicode code points using a complete Go program with explicit sample inputs.
Go✓ Tested
Count Unicode code points in a string
JavaScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.
JavaScript✓ Tested
Count Unicode code points in a string
TypeScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.
TypeScript✓ Tested
Count values with the entry API
Count values with the entry API in a complete Rust program using the standard library.
Rust✓ Tested
Count word frequencies
Use Map.merge to count repeated words in Java.
Java✓ Tested
Count word frequencies
Accumulate word counts in an ordered C++ map.
C++✓ Tested
Count words using a Map
Update a keyed counter without losing its value type.
Map✓ Tested
Create a branch at the original base of a stash
Git: stash branch checks out the stash’s base and reapplies the saved work there.
Git✓ Tested