Results for “to_char”
Small, practical examples. Search by task or narrow things down below.
Add spacing between characters
CSS: Letter-spacing adds a consistent amount between typographic characters.
CSS✓ Tested
Count a leading run of allowed characters
C: strspn counts bytes at the start that belong to a specified character set.
C✓ Tested
Count newline characters
Count newline bytes in a C file while retaining EOF as an int.
C✓ Tested
Dispatch a one-character serial command
Arduino / C: A switch provides explicit handling for accepted and unknown commands.
Arduino / C✓ Tested
Display reserved characters as text
HTML: Learn how to display reserved characters as text in a complete browser example.
HTML✓ Tested
Distinguish UTF-8 bytes from characters
Distinguish UTF-8 bytes from characters in a complete Rust program using the standard library.
Rust✓ Tested
Find the first occurrence of a character
C: strchr returns a pointer into the input or NULL if the character is absent.
C✓ Tested
Format a timestamp with to_char
Produce a fixed numeric date string.
to_char✓ Tested
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
Measure UTF-8 bytes separately from characters
Java: Encode a Java string before measuring its serialized byte length.
Java✓ Tested
Parse a hexadecimal integer with from_chars
C++: An explicit radix controls digit interpretation without a locale dependency.
C++✓ Tested
Print a single character
Arduino / C: Print a single character on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested