FIND YOUR NEXT FEW LINES

Results for “character”

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

205 snippets foundClear filters
CFile positioning & lifecycle

Read characters without confusing EOF with a byte

C: Store fgetc in int so every unsigned-char value remains distinguishable from EOF.

C✓ Tested
PythonGetting Started

Read one character from ASCII text

Python: Use a valid zero-based index to read the first character.

Python✓ Tested
C#Getting Started

Read one character from ASCII text

C#: Use a valid zero-based index to read the first character.

C#✓ Tested
JavaGetting Started

Read one character from ASCII text

Java: Use a valid zero-based index to read the first character.

Java✓ Tested
JavaScriptGetting Started

Read one character from ASCII text

JavaScript: Use a valid zero-based index to read the first character.

JavaScript✓ Tested
TypeScriptGetting Started

Read one character from ASCII text

TypeScript: Use a valid zero-based index to read the first character.

TypeScript✓ Tested
C++Getting Started

Read one character from ASCII text

C++: Use a valid zero-based index to read the first character.

C++✓ Tested
CGetting Started

Read one character from ASCII text

C: Use a valid zero-based index to read the first character.

C✓ Tested
Arduino / CSerial communication

Read one character from serial input

Wait for an incoming byte without blocking the main loop.

Serial.available✓ Tested
Arduino / CText & bounded buffers

Reject an integer with trailing characters

Arduino / C: strtol exposes an end pointer so a parser can require the entire token.

Arduino / C✓ Tested
Linux CommandsTransforming text

Remove carriage-return characters

Linux Commands: Use tr -d to remove CR characters from Windows-style line endings.

Linux Commands✓ Tested
JavaScriptRegular expressions & URL encoding

Split text on several separator characters

JavaScript: A regex character class can recognize alternative simple delimiters.

JavaScript✓ Tested