FIND YOUR NEXT FEW LINES

Results for “to_char”

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

211 snippets foundClear filters
CSSType & reading flow

Add spacing between characters

CSS: Letter-spacing adds a consistent amount between typographic characters.

CSS✓ Tested
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
CFiles

Count newline characters

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

C✓ Tested
Arduino / CSerial protocols

Dispatch a one-character serial command

Arduino / C: A switch provides explicit handling for accepted and unknown commands.

Arduino / C✓ Tested
HTMLGetting Started

Display reserved characters as text

HTML: Learn how to display reserved characters as text in a complete browser example.

HTML✓ Tested
RustStrings & Unicode

Distinguish UTF-8 bytes from characters

Distinguish UTF-8 bytes from characters in a complete Rust program using the standard library.

Rust✓ Tested
CStrings & byte buffers

Find the first occurrence of a character

C: strchr returns a pointer into the input or NULL if the character is absent.

C✓ Tested
PostgresDates & series

Format a timestamp with to_char

Produce a fixed numeric date string.

to_char✓ Tested
Bash ScriptsArray operations

Join array items with a one-character separator

Bash Scripts: A local IFS controls the separator used by the quoted star expansion.

Bash Scripts✓ Tested
JavaEncoding & structured values

Measure UTF-8 bytes separately from characters

Java: Encode a Java string before measuring its serialized byte length.

Java✓ Tested
C++Numeric parsing & calculations

Parse a hexadecimal integer with from_chars

C++: An explicit radix controls digit interpretation without a locale dependency.

C++✓ Tested
Arduino / CGetting Started

Print a single character

Arduino / C: Print a single character on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested