FIND YOUR NEXT FEW LINES

Results for “C”

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

3000 snippets foundClear filters
PostgresGetting Started

Count the rows in a table

Postgres: COUNT(*) includes every row, including rows with NULL columns.

Postgres✓ Tested
SQLiteGetting Started

Count the rows in a table

SQLite: COUNT(*) includes every row, including rows with NULL columns.

SQLite✓ Tested
JavaText validation & formatting

Count Unicode code points

Java: Use codePointCount when supplementary characters should count as one rather than two UTF-16 units.

Java✓ Tested
GoGetting Started

Count Unicode code points

Count Unicode code points using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaScriptText handling & Unicode

Count Unicode code points in a string

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

JavaScript✓ 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
RustMaps & sets

Count values with the entry API

Count values with the entry API in a complete Rust program using the standard library.

Rust✓ Tested
Linux CommandsStreams & byte tools

Count whitespace-separated words

Linux Commands: Use wc -w with standard input to omit the filename column.

Linux Commands✓ Tested
JavaCollections

Count word frequencies

Use Map.merge to count repeated words in Java.

Java✓ Tested
C++Collections

Count word frequencies

Accumulate word counts in an ordered C++ map.

C++✓ Tested
TypeScriptCollections & records

Count words using a Map

Update a keyed counter without losing its value type.

Map✓ Tested
C#Collections

Count words with GroupBy

Group repeated C# words and print ordered counts.

C#✓ Tested